Skip to content

Commit

Permalink
Casper 2.0:
Browse files Browse the repository at this point in the history
* Improved errors.
* Unified rust-toolchain across packages.
* Removed ContractPackageHash.
* Moved handling Odra errors outside rpc client.
* Removed casper types through odra types from rpc client.
* Update chainspec to be compatible with newest version of Condor.
* Native events.
  • Loading branch information
kubaplas committed Oct 24, 2024
1 parent d669109 commit 33b943e
Show file tree
Hide file tree
Showing 113 changed files with 2,244 additions and 2,760 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
test:
name: Test
runs-on: buildjet-8vcpu-ubuntu-2204
services:
casper-nctl:
image: makesoftware/casper-nctl:v155
options: --name mynctl
env:
PREDEFINED_ACCOUNTS: 'true'
MINIMUM_ROUND_EXPONENT: '12'
MAXIMUM_ROUND_EXPONENT: '14'
DEPLOY_DELAY: '5sec'
ports:
- 11101:11101
# services:
# casper-nctl:
# image: makesoftware/casper-nctl:v200-rc3
# options: --name mynctl
# env:
# PREDEFINED_ACCOUNTS: 'true'
# MINIMUM_ROUND_EXPONENT: '12'
# MAXIMUM_ROUND_EXPONENT: '14'
# DEPLOY_DELAY: '30sec'
# ports:
# - 11101:11101
steps:
- name: Setup just
uses: extractions/setup-just@v1
Expand All @@ -50,5 +50,5 @@ jobs:
run: just prepare-test-env
- name: Run tests
run: just test
- name: Run livenet tests
run: just test-livenet
# - name: Run livenet tests
# run: just test-livenet
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Cargo.lock
odra-casper/**/target/
examples/.builder_casper
examples/wasm
examples/ourcoin/wasm
examples/.env
examples/.env.testnet
examples/.env.integration
modules/.builder_casper
modules/wasm
benchmark/wasm
benchmark/gas_report.json
benchmark/wasm
.DS_Store
57 changes: 41 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
members = [
"odra",
"odra-vm",
"benchmark",
"core",
"examples",
"examples/ourcoin",
"modules",
"odra-macros",
"odra-casper/rpc-client",
"odra-casper/livenet-env",
Expand All @@ -11,36 +15,57 @@ members = [
"odra-cli",
"odra-schema",
"odra-test",
"odra-build"
]
exclude = [ "examples", "modules", "benchmark", "odra-casper/proxy-caller", "templates/blank", "templates/full", "templates/workspace", "tests"]
"odra-build",
]
exclude = ["odra-casper/proxy-caller", "templates/blank", "templates/full", "templates/workspace", "tests"]
resolver = "2"

[workspace.package]
version = "1.4.0"
version = "2.0.0"
authors = ["Jakub Płaskonka <[email protected]>", "Krzysztof Pobiarżyn <[email protected]>", "Maciej Zieliński <[email protected]>"]
license = "MIT"
homepage = "https://odra.dev/docs"
repository = "https://github.com/odradev/odra"

[workspace.dependencies]
odra-core = { path = "core", version = "1.4.0" }
odra-macros = { path = "odra-macros", version = "1.4.0" }
odra-casper-test-vm = { path = "odra-casper/test-vm", version = "1.4.0" }
odra-casper-rpc-client = { path = "odra-casper/rpc-client", version = "1.4.0" }
odra-vm = { path = "odra-vm", version = "1.4.0" }
odra-casper-wasm-env = { path = "odra-casper/wasm-env", version = "1.4.0"}
odra-casper-livenet-env = { path = "odra-casper/livenet-env", version = "1.4.0"}
odra-schema = { path = "odra-schema", version = "1.4.0" }
casper-contract = { version = "4.0.0", default-features = false }
casper-types = { version = "4.0.1", default-features = false }
casper-execution-engine = "7.0.1"
casper-event-standard = "0.5.0"
odra-core = { path = "core", version = "2.0.0" }
odra-macros = { path = "odra-macros", version = "2.0.0" }
odra-casper-test-vm = { path = "odra-casper/test-vm", version = "2.0.0" }
odra-casper-rpc-client = { path = "odra-casper/rpc-client", version = "2.0.0" }
odra-vm = { path = "odra-vm", version = "2.0.0" }
odra-casper-wasm-env = { path = "odra-casper/wasm-env", version = "2.0.0"}
odra-schema = { path = "odra-schema", version = "2.0.0" }
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "rustSDK-feat-2.0", default-features = false }
casper-contract-schema = { git = "https://github.com/odradev/casper-contract-schema.git", branch = "feature/casper-2.0" }
casper-types = "5.0.0"
casper-execution-engine = { git = "https://github.com/casper-network/casper-node.git", branch = "rustSDK-feat-2.0" }
casper-engine-test-support = { git = "https://github.com/casper-network/casper-node.git", branch = "rustSDK-feat-2.0" }
casper-storage = { git = "https://github.com/casper-network/casper-node.git", branch = "rustSDK-feat-2.0" }
casper-event-standard = { git = "https://github.com/odradev/casper-event-standard.git", branch = "rustSDK-feat-2.0" }
casper-client = { git = "https://github.com/casper-ecosystem/casper-client-rs.git", branch = "rustSDK-feat-2.0" }
blake2 = "0.10.6"
log = "0.4.20"
env_logger = "0.11.1"
serde = { version = "1.0.195", default-features = false }
serde_json = { version = "1.0.113", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
mockall = { version = "0.12.1" }
sha3 = { version = "0.10", default-features = false }
hex = "0.4"
tokio = "1.38"
base16 = { version = "0.2", default-features = false }
base64 = { version = "0.22", default-features = false, features = ["alloc"] }
serde-json-wasm = { version = "1.0", default-features = false }
anyhow = { version = "1.0.86", default-features = false }
convert_case = "0.6.0"
lazy_static = "1.5.0"

[patch.crates-io]
casper-types = { version = "5.0.0", git = "https://github.com/casper-network/casper-node", branch = "rustSDK-feat-2.0" }

[profile.release]
codegen-units = 1
lto = true

[profile.dev.package."*"]
opt-level = 3
13 changes: 3 additions & 10 deletions benchmark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "benchmark"
version = "0.1.0"
version = "2.0.0"
edition = "2021"

[dependencies]
odra = { path = "../odra" }
odra-test = { path = "../odra-test", optional = true }
odra-modules = { path = "../modules" }
base64 = { version = "0.22.0", default-features = false, features = ["alloc"] }
base64 = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
serde_json = "1.0.113"
serde_json = { workspace = true }

[[bin]]
name = "benchmark_build_contract"
Expand All @@ -33,13 +33,6 @@ name = "evaluate_benchmark"
path = "bin/evaluate_benchmark.rs"
test = false

[profile.release]
codegen-units = 1
lto = true

[profile.dev.package."*"]
opt-level = 3

[features]
default = []
benchmark = ["odra-test"]
1 change: 0 additions & 1 deletion benchmark/rust-toolchain

This file was deleted.

1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ casper-event-standard = { workspace = true }
num-traits = { workspace = true }
serde = { workspace = true, default-features = false, features = ["alloc", "derive"] }
serde_json = { workspace = true, default-features = false, features = ["alloc"] }
anyhow = { workspace = true }

[dev-dependencies]
mockall = { workspace = true }
Expand Down
Loading

0 comments on commit 33b943e

Please sign in to comment.