Skip to content

Commit

Permalink
Wako Release v3.3.5 (#327)
Browse files Browse the repository at this point in the history
* update deps

* bump version

* remove orml nft module

* remove currencies and rust side tokens modules

* final fix

* update Dockerfile

* update readme

* Patch codegen units to fix build

* fix tests
  • Loading branch information
raykyri authored Sep 28, 2021
1 parent accf1d5 commit 525aa87
Show file tree
Hide file tree
Showing 28 changed files with 908 additions and 3,373 deletions.
1,779 changes: 852 additions & 927 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ members = [
"client/rpc-core/trace",
"client/rpc-core/txpool",
"pallets/edge-treasury-reward",
"pallets/orml-nft",
"pallets/nft",
"node/cli",
"node/opts",
"node/executor",
Expand All @@ -27,10 +25,9 @@ exclude = ["vendor"]
[profile.release]
# Edgeware runtime requires unwinding.
panic = "unwind"
codegen-units=1

[profile.dev.package]
aes-soft = { opt-level = 3 }
aesni = { opt-level = 3 }
blake2 = { opt-level = 3 }
blake2-rfc = { opt-level = 3 }
blake2b_simd = { opt-level = 3 }
Expand Down
59 changes: 26 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# edgeware-node

[Edgeware](https://edgewa.re) is an:
- On-chain Governed,
- Proof-of-Stake (PoS) Blockchain
- with a WASM Runtime.

## For node operators, validators, and other users
[Edgeware](https://edgewa.re) is a proof-of-stake smart contract
blockchain with a community-managed treasury, decentralized proposal
system, and network of DAOs.

A getting started guide can be found at our [Github
Wiki](https://github.com/hicommonwealth/edgeware-node/wiki), including
Expand All @@ -18,32 +15,15 @@ check out the [blog](https://blog.edgewa.re) or
governance, campaigns and proposals can be found on
[Commonwealth](https://commonwealth.im).

## For developers

### Quickstart

If your device is clean (such as a fresh cloud VM) you can use this
script for an automated setup:

```
./setup.sh
```

Otherwise, proceed with the full instructions below.

### Manual setup
script for an automated setup: `./setup.sh`

Install system dependencies:

Linux:
```
sudo apt install cmake pkg-config libssl-dev git clang libclang-dev
```

Mac:
```
brew install cmake pkg-config openssl git llvm
```
- Linux: `sudo apt install cmake pkg-config libssl-dev git clang libclang-dev`
- Mac: `brew install cmake pkg-config openssl git llvm`

Install Edgeware dependencies:

Expand All @@ -59,20 +39,36 @@ Build Edgeware:
```
cargo build --release
```

Build for Edgeware's Beresheet testnet, which uses a different runtime version and EVM chain ID:

```
cargo build --release --features beresheet-runtime
```

Build a WASM runtime to be deployed on-chain using [srtool](https://github.com/paritytech/srtool):

```
cargo install --git https://github.com/chevdor/srtool-cli
srtool build --package edgeware-runtime --runtime-dir node/runtime . --app --json
```

Build a WASM runtime for Beresheet:

```
srtool build --package edgeware-runtime --runtime-dir node/runtime . --app --json --build-opts="--features=beresheet-runtime"
```

Ensure you have a fresh start if updating from another version:
```
./scripts/purge-chain.sh <NETWORK_NAME_ID>
```

To start up the Edgeware node and connect to the Mainnet, run:
```
./target/release/edgeware --chain=edgeware --name <INSERT_NAME> --wasm-execution Compiled
```

To start up the Edgeware node and connect to the Beresheet testnet, run:
```
./target/release/edgeware --chain=beresheet --name <INSERT_NAME>
Expand All @@ -86,9 +82,9 @@ To run a local build using docker, run:
```
docker build -f docker/Dockerfile .
```
Images that have failed to build typically are hard to remove. The best way to reclaim the wasted space is to uninstall Docker and then reinstall.
Images that have failed to build typically are hard to remove. The best way to reclaim the wasted space is to uninstall Docker and then reinstall.

If the above image failed to compile `edgeware-cli`, then it's because your machine doesnt have enough memory; or your docker doesn't have enough memory available. Try and increase Docker's available memory by a few notches, by going to Docker Desktop settings.
If the above image failed to compile `edgeware-cli`, then it's because your machine doesnt have enough memory; or your docker doesn't have enough memory available. Try and increase Docker's available memory by a few notches, by going to Docker Desktop settings.

#### Pull image and run (no compile)
If you want to use our previously-built image `decentration/edgeware:v3.3.3`, you can use docker-compose:
Expand All @@ -104,14 +100,11 @@ Then run:
docker run --rm -it decentration/edgeware:v3.3.3 edgeware --chain=edgeware --name <INSERT NAME> --wasm-execution Compiled
```




### Module Benchmarking
### Benchmarking

To build in benchmarking mode:
```
cd node/cli && cargo build --features runtime-benchmarks --release
cargo build --features runtime-benchmarks --release
```

To run benchmarks and output new weight files while still in the `node/cli` folder (replace `signaling` with `voting` to benchmark voting instead):
Expand Down
1 change: 1 addition & 0 deletions client/rpc/debug/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ where
client.as_ref(),
frontier_backend.as_ref(),
transaction_hash,
true
) {
Ok(Some((hash, index))) => (hash, index as usize),
Ok(None) => return Err(internal_err("Transaction hash not found".to_string())),
Expand Down
10 changes: 5 additions & 5 deletions node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-cli"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
description = "Edgeware implementation using a substrate node."
build = "build.rs"
Expand Down Expand Up @@ -95,10 +95,10 @@ pallet-dynamic-fee = { git = "https://github.com/webb-tools/frontier", branch =
pallet-evm = { git = "https://github.com/webb-tools/frontier", branch = "erup-4" }

# node-specific dependencies
edgeware-runtime = { version = "3.3.3", path = "../runtime", default-features = false }
edgeware-rpc = { version = "3.3.3", path = "../rpc" }
edgeware-primitives = { version = "3.3.3", path = "../primitives", default-features = false }
edgeware-executor = { version = "3.3.3", path = "../executor", default-features = false }
edgeware-runtime = { version = "3.3.5", path = "../runtime", default-features = false }
edgeware-rpc = { version = "3.3.5", path = "../rpc" }
edgeware-primitives = { version = "3.3.5", path = "../primitives", default-features = false }
edgeware-executor = { version = "3.3.5", path = "../executor", default-features = false }
edgeware-rpc-txpool = { path = "../../client/rpc/txpool", default-features = false }
edgeware-rpc-primitives-txpool = { path = "../txpool", default-features = false }
edgeware-rpc-debug = { path = "../../client/rpc/debug", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ pub fn testnet_genesis(
current_payout: 95 * DOLLARS,
minting_interval: One::one(),
},
orml_nft: Default::default(),
}
}

Expand Down Expand Up @@ -483,7 +482,6 @@ pub fn mainnet_genesis(
current_payout: 95 * DOLLARS,
minting_interval: One::one(),
},
orml_nft: Default::default(),
}
}

Expand Down
8 changes: 4 additions & 4 deletions node/executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-executor"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
description = "Edgeware implementation using a substrate node."
edition = "2018"
Expand All @@ -19,9 +19,9 @@ sp-core = { version = "3.0" }
sp-trie = { version = "3.0" }
frame-benchmarking = { version = "3.0" }

edgeware-primitives = { version = "3.3.3", path = "../primitives" }
edgeware-runtime = { version = "3.3.3", path = "../runtime" }
edgeware-runtime-interface = { version = "3.3.3", path = "../runtime-interface" }
edgeware-primitives = { version = "3.3.5", path = "../primitives" }
edgeware-runtime = { version = "3.3.5", path = "../runtime" }
edgeware-runtime-interface = { version = "3.3.5", path = "../runtime-interface" }

[dev-dependencies]
sp-runtime = { version = "3.0" }
Expand Down
2 changes: 1 addition & 1 deletion node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-primitives"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
Expand Down
2 changes: 0 additions & 2 deletions node/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ pub type Block = generic::Block<Header, OpaqueExtrinsic>;
/// Block ID.
pub type BlockId = generic::BlockId<Block>;

/// NFT balance for nft module
pub type NFTBalance = u128;
/// Asset id type for assets module
pub type AssetId = u32;
/// Token amount type for tokens module
Expand Down
3 changes: 1 addition & 2 deletions node/rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-rpc-client"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
Expand All @@ -17,4 +17,3 @@ log = "0.4.8"
edgeware-primitives = { path = "../primitives" }
sp-tracing = { version = "3.0" }
sc-rpc = { version = "3.0" }

2 changes: 1 addition & 1 deletion node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-rpc"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
Expand Down
3 changes: 2 additions & 1 deletion node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,15 @@ where
pending_transactions.clone(),
signers,
overrides.clone(),
backend,
backend.clone(),
is_authority,
max_past_logs,
)));

if let Some(filter_pool) = filter_pool {
io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new(
client.clone(),
backend.clone(),
filter_pool.clone(),
500 as usize, // max stored filters
overrides.clone(),
Expand Down
2 changes: 1 addition & 1 deletion node/runtime-interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-runtime-interface"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
description = "Edgeware runtime interface helpers and functions"
edition = "2018"
Expand Down
16 changes: 3 additions & 13 deletions node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edgeware-runtime"
version = "3.3.3"
version = "3.3.5"
authors = ["Commonwealth Labs <[email protected]>"]
edition = "2018"
build = "build.rs"
Expand Down Expand Up @@ -46,7 +46,7 @@ sp-offchain = { version = "3.0", default-features = false }
sp-npos-elections = { version = "3.0", default-features = false }

# edgeware primitives
edgeware-primitives = { version = "3.3.3", path = "../primitives", default-features = false }
edgeware-primitives = { version = "3.3.5", path = "../primitives", default-features = false }
edgeware-evm-tracer = { path = "../evm_tracer", default-features = false }
edgeware-rpc-primitives-debug = { path = "../debug", default-features = false }
edgeware-rpc-primitives-txpool = { path = "../txpool", default-features = false }
Expand Down Expand Up @@ -93,8 +93,6 @@ pallet-transaction-payment-rpc-runtime-api = { version = "3.0", default-features
pallet-vesting = { version = "3.0", default-features = false }

treasury-reward = { package = "edge-treasury-reward", path = "../../pallets/edge-treasury-reward", default-features = false }
orml-nft = { path = "../../pallets/orml-nft", default-features = false }
nft = { package = "module-nft", path = "../../pallets/nft", default-features = false }

pallet-dynamic-fee = { default-features = false, git = "https://github.com/webb-tools/frontier", branch = "erup-4" }
fp-rpc = { default-features = false, git = "https://github.com/webb-tools/frontier", branch = "erup-4" }
Expand All @@ -111,10 +109,6 @@ pallet-evm-precompile-curve25519 = { git = "https://github.com/webb-tools/fronti

sha3 = { version = "0.9", default-features = false }

webb-currencies = { default-features = false, git = "https://github.com/webb-tools/anon" }
webb-tokens = { default-features = false, git = "https://github.com/webb-tools/anon" }
webb-traits = { default-features = false, git = "https://github.com/webb-tools/anon" }

evm = { version = "0.27.0", default-features = false, features = ["with-codec"] }

# used for runtime benchmarking
Expand Down Expand Up @@ -205,11 +199,7 @@ std = [
"pallet-tips/std",
"pallet-bounties/std",
"sp-npos-elections/std",
"webb-currencies/std",
"webb-tokens/std",
"orml-nft/std",
"nft/std",
"edgeware-evm-tracer/std",
"edgeware-evm-tracer/std",
"edgeware-rpc-primitives-debug/std",
"edgeware-rpc-primitives-txpool/std",
]
Expand Down
2 changes: 1 addition & 1 deletion node/runtime/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// Money matters.
pub mod currency {
pub use edgeware_primitives::{Balance, AssetId, Amount, CurrencyId};
pub use edgeware_primitives::{Balance, Amount, CurrencyId};

pub const MILLICENTS: Balance = 10_000_000_000_000;
pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent.
Expand Down
Loading

0 comments on commit 525aa87

Please sign in to comment.