Skip to content

Commit

Permalink
Add mpc blueprint starting point, cleanup abstractions (#252)
Browse files Browse the repository at this point in the history
* Add mpc blueprint starting point

* Updates

* Merge main

* Work on integrating network for MPC and cleaning up common

* Attempts to clean up and add comments

* Remove core/common/environments (#251)

* Remove core, common, refactor into SDK

* Reworking blueprint manager and mpc blueprint

* Continuing refactoring keygen job

* Continuing refactoring keygen job

* Cleanup

* Remove core, common, refactor into SDK

* Remove common/core/environments from main merge

* Logger fix

* Remove old packages from CI

* Fix all features build

* Remove `Error` suffix from error variants

* fmt

* allow clippy::let_underscore_future

* Fix a few more clippy warnings

* Remove invalid package category

---------

Co-authored-by: Serial <[email protected]>
  • Loading branch information
drewstone and Serial-ATA authored Sep 11, 2024
1 parent 3d71b29 commit c8c569a
Show file tree
Hide file tree
Showing 113 changed files with 2,063 additions and 5,964 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
strategy:
matrix:
package: [
gadget-core,
gadget-common,
gadget-sdk,
gadget-sdk
]
steps:
- name: Checkout code
Expand Down Expand Up @@ -77,8 +75,7 @@ jobs:
strategy:
matrix:
package: [
gadget-core,
gadget-common,
gadget-sdk,
blueprint-manager
]
steps:
Expand Down Expand Up @@ -107,8 +104,7 @@ jobs:
strategy:
matrix:
package: [
gadget-core,
gadget-common,
gadget-sdk,
blueprint-manager,
]
steps:
Expand Down Expand Up @@ -136,4 +132,4 @@ jobs:
run: cargo install cargo-nextest --locked

- name: tests
run: cargo nextest run --nocapture --package ${{ matrix.package }}
run: cargo nextest run --nocapture --package ${{ matrix.package }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ target/
certs
.DS_Store
CODEGEN_LOCK
blueprints/**/lib
12 changes: 11 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# For the incredible-squaring blueprint
[submodule "blueprints/incredible-squaring/contracts/lib/forge-std"]
path = blueprints/incredible-squaring/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "blueprints/incredible-squaring/contracts/lib/eigenlayer-middleware"]
path = blueprints/incredible-squaring/contracts/lib/eigenlayer-middleware
url = https://github.com/Layr-Labs/eigenlayer-middleware
url = https://github.com/Layr-Labs/eigenlayer-middleware

# For the ecdsa-threshold-mpc blueprint
[submodule "blueprints/ecdsa-threshold-mpc/contracts/lib/forge-std"]
path = blueprints/ecdsa-threshold-mpc/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "blueprints/ecdsa-threshold-mpc/contracts/lib/tnt-core"]
path = blueprints/ecdsa-threshold-mpc/contracts/lib/tnt-core
url = https://github.com/webb-tools/tnt-core
branch = main
104 changes: 9 additions & 95 deletions Cargo.lock

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

13 changes: 2 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
resolver = "2"
members = [
"blueprint-metadata",
"blueprints/*",
"blueprints/incredible-squaring",
"cli",
"core",
"common",
"executor",
"environments/tangle",
"environments/utils",
"gadget-io",
"blueprint-test-utils",
"protocol-macros",
"blueprint-manager",
"sdk",
# Commented out, since it uses jobs-v1 code
Expand Down Expand Up @@ -45,16 +40,11 @@ single_match_else = "allow"
broken_intra_doc_links = "deny"

[workspace.dependencies]
gadget-core = { version = "0.0.1", path = "./core", default-features = false }
gadget-common = { version = "0.1.0", path = "./common", default-features = false }
gadget-io = { version = "0.0.1", path = "./gadget-io", default-features = false }
gadget-executor = { version = "0.1.0", path = "./executor" }
blueprint-manager = { version = "0.1.1", path = "./blueprint-manager" }
blueprint-test-utils = { path = "./blueprint-test-utils" }
gadget-sdk = { path = "./sdk", default-features = false }
protocol-macros = { path = "./protocol-macros" }
tangle-environment = { path = "./environments/tangle", default-features = false }
environment-utils = { path = "./environments/utils", default-features = false }

gadget-blueprint-proc-macro = { path = "./macros/blueprint-proc-macro", default-features = false, version = "0.1.0" }
gadget-blueprint-proc-macro-core = { path = "./macros/blueprint-proc-macro-core", default-features = false, version = "0.1.0" }
Expand Down Expand Up @@ -192,6 +182,7 @@ hex = { version = "0.4.3", default-features = false }
hex-literal = "0.4.1"
http-body-util = "0.1.2"
hyper = { version = "1.4.1", default-features = false }
hyper-util = "0.1.7"
itertools = "0.13.0"
jsonrpsee = "0.24.3"
jsonwebtoken = "9.3.0"
Expand Down
4 changes: 0 additions & 4 deletions blueprint-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ path = "src/cli.rs"

[dependencies]
sp-core = { workspace = true }
gadget-core = { workspace = true }
gadget-common = { workspace = true }
gadget-io = { workspace = true }
gadget-sdk = { workspace = true }
color-eyre = { workspace = true, features = ["tracing-error", "color-spantrace", "issue-url"] }
Expand All @@ -22,7 +20,6 @@ hex = { workspace = true }
tokio = { workspace = true, features = ["process", "io-util", "signal"] }
reqwest = { workspace = true }
sha2 = { workspace = true }
tangle-environment = { workspace = true }
futures = { workspace = true }

log = { workspace = true }
Expand All @@ -35,7 +32,6 @@ libp2p = { workspace = true }
[features]
default = ["std"]
std = [
"gadget-common/std",
"gadget-io/std",
"gadget-sdk/default",
]
1 change: 0 additions & 1 deletion blueprint-manager/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use blueprint_manager::config::BlueprintManagerConfig;
use blueprint_manager::run_blueprint_manager;
use blueprint_manager::sdk;
use blueprint_manager::sdk::utils::msg_to_error;
use gadget_common::gadget_io;
use gadget_io::GadgetConfig;
use structopt::StructOpt;

Expand Down
Loading

0 comments on commit c8c569a

Please sign in to comment.