Skip to content

Commit

Permalink
feat: MPC Jobs pallet (#285)
Browse files Browse the repository at this point in the history
Co-authored-by: Salman Pathan <[email protected]>
Co-authored-by: drewstone <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2023
1 parent 4179289 commit bf7e79a
Show file tree
Hide file tree
Showing 59 changed files with 2,429 additions and 306 deletions.
1 change: 0 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,3 @@ jobs:

- name: Check
run: cargo check --release

47 changes: 47 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@ repository = "https://github.com/webb-tools/tangle"

[workspace]
members = [
"primitives",
"primitives/rpc/*",
"primitives/ext",
"client/evm-tracing",
"client/rpc/*",
"client/rpc-core/*",
"client/voter",
"standalone/node",
"standalone/runtime",
"standalone/runtime/evm_tracer",
"pallets/claims",
"pallets/transaction-pause",
"pallets/roles",
"precompiles/utils",
"precompiles/utils/macro",
"precompiles/utils/tests-external",
"precompiles/pallet-democracy",
"precompiles/batch",
"precompiles/call-permit",
"precompiles/proxy",
"precompiles/preimage",
"primitives",
"primitives/rpc/*",
"primitives/ext",
"client/evm-tracing",
"client/rpc/*",
"client/rpc-core/*",
"client/voter",
"standalone/node",
"standalone/runtime",
"standalone/runtime/evm_tracer",
"pallets/*",
"pallets/roles",
"pallets/jobs/rpc",
"pallets/jobs/rpc/runtime-api",
"precompiles/utils",
"precompiles/utils/macro",
"precompiles/utils/tests-external",
"precompiles/pallet-democracy",
"precompiles/batch",
"precompiles/call-permit",
"precompiles/proxy",
"precompiles/preimage",
]
resolver = "2"

Expand Down Expand Up @@ -68,7 +69,6 @@ hex = { version = "0.4.3", default-features = false }
paste = "1.0.6"
slices = "0.2.0"


# DKG Substrate Dependencies
dkg-runtime-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git", tag = "v0.4.7", default-features = false }
pallet-dkg-metadata = { git = "https://github.com/webb-tools/dkg-substrate.git", tag = "v0.4.7", default-features = false }
Expand All @@ -84,6 +84,7 @@ tangle-runtime = { package = "tangle-standalone-runtime", path = "standalone/run

# Tangle Dependencies
pallet-ecdsa-claims = { path = "pallets/claims", default-features = false }
pallet-jobs = { path = "pallets/jobs", default-features = false }
pallet-roles = { path = "pallets/roles", default-features = false }

# Orml dependencies
Expand Down Expand Up @@ -115,8 +116,8 @@ sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "pol
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0",default-features = false }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0",default-features = false }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
Expand Down Expand Up @@ -236,7 +237,6 @@ pallet-evm-precompile-preimage = { path = "precompiles/preimage", default-featur
pallet-evm-precompile-registry = { path = "precompiles/precompile-registry", default-features = false }
pallet-evm-precompile-staking = { path = "precompiles/staking", default-features = false }


# EVM & Ethereum
# (wasm)
evm = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false }
Expand Down Expand Up @@ -292,7 +292,7 @@ pallet-eth2-light-client-relayer-gadget-cli = { git = "https://github.com/webb-t
webb-consensus-types = { git = "https://github.com/webb-tools/pallet-eth2-light-client", default-features = false, tag = "v0.4.5" }

webb = { version = "0.8", default-features = false }
webb-proposals = { git = "https://github.com/webb-tools/webb-rs.git", rev="a960eaf", default-features = false, features = ["scale", "evm"] }
webb-proposals = { git = "https://github.com/webb-tools/webb-rs.git", rev = "a960eaf", default-features = false, features = ["scale", "evm"] }

primitives-ext = { path = "primitives/ext", default-features = false }
evm-tracing-events = { path = "primitives/rpc/evm-tracing-events", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion client/evm-tracing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "client-evm-tracing"
version = "0.1.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.1.0"

[dependencies]
ethereum-types = { workspace = true, features = ["std"] }
Expand Down
4 changes: 2 additions & 2 deletions client/rpc-core/debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "rpc-core-debug"
version = "0.1.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.1.0"

[dependencies]
client-evm-tracing = { workspace = true }
ethereum-types = { workspace = true, features = ["std"] }
futures = { workspace = true, features = ["compat"] }
jsonrpsee = { workspace = true, features = ["macros", "server"] }
client-evm-tracing = { workspace = true }
rpc-core-types = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions client/rpc-core/trace/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "rpc-core-trace"
version = "0.6.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.6.0"

[dependencies]
client-evm-tracing = { workspace = true }
ethereum-types = { workspace = true, features = ["std"] }
futures = { workspace = true, features = ["compat"] }
jsonrpsee = { workspace = true, features = ["macros", "server"] }
client-evm-tracing = { workspace = true }
rpc-core-types = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
2 changes: 1 addition & 1 deletion client/rpc-core/txpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rpc-core-txpool"
version = "0.6.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.6.0"

[dependencies]
ethereum = { workspace = true, features = ["std", "with-codec"] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-core/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rpc-core-types"
version = "0.1.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.1.0"

[dependencies]
ethereum-types = { workspace = true, features = ["std"] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rpc-debug"
version = "0.1.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.1.0"

[dependencies]
futures = { workspace = true, features = ["compat"] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/trace/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rpc-trace"
version = "0.6.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.6.0"

[dependencies]
ethereum = { workspace = true, features = ["with-codec"] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/txpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rpc-txpool"
version = "0.6.0"
authors = { workspace = true }
edition = "2021"
license = "GPL-3.0-only"
repository = { workspace = true }
version = "0.6.0"

[dependencies]
jsonrpsee = { workspace = true, features = ["macros", "server"] }
Expand Down
8 changes: 4 additions & 4 deletions client/voter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name = "tangle-voter"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
anyhow = { version = "1" }
clap = { workspace = true }
hex = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
clap = { workspace = true }
tracing = { workspace = true }
hex = { workspace = true }
webb = { workspace = true, features = ["evm-runtime"] }
webb-proposals = { workspace = true, features = ["evm", "std"] }
anyhow = { version = "1" }
2 changes: 1 addition & 1 deletion light-client-configs/block-relay-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ substrate_requests_timeout_seconds = 30
sleep_time_on_sync_secs = 20
sleep_time_after_submission_secs = 5
hashes_gc_threshold = 51000
beacon_rpc_version = "V1_5"
beacon_rpc_version = "V1_5"
2 changes: 1 addition & 1 deletion pallets/claims/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name = "pallet-ecdsa-claims"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.docs.rs]
Expand Down
46 changes: 46 additions & 0 deletions pallets/jobs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[package]
name = "pallet-jobs"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[dependencies]
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
tangle-primitives = { workspace = true, default-features = false }

[dev-dependencies]
pallet-balances = { workspace = true }
smallvec = { workspace = true }
sp-io = { workspace = true }

[features]
default = ["std"]
std = [
"scale-info/std",
"sp-runtime/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"sp-core/std",
"sp-std/std",
"tangle-primitives/std",
"pallet-balances/std",
]
try-runtime = ["frame-support/try-runtime"]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
]
23 changes: 23 additions & 0 deletions pallets/jobs/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "pallet-jobs-rpc"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
pallet-jobs-rpc-runtime-api = { path = "./runtime-api" }
parity-scale-codec = { workspace = true }
sp-api = { workspace = true }
sp-blockchain = { workspace = true }
sp-core = { workspace = true }
sp-rpc = { workspace = true }
sp-runtime = { workspace = true }
sp-weights = { workspace = true }
tangle-primitives = { workspace = true }
Loading

0 comments on commit bf7e79a

Please sign in to comment.