Skip to content

Commit

Permalink
Edgeware upgrade to Substrate 2.0 (#243)
Browse files Browse the repository at this point in the history
* Add frontier vendor.

* Runtime builds.

* Fix build issues with contracts and grandpa.

* Working against new service file, still eth error [skip ci]

* Updates to frontier edgeware compat

* Fixes more errors

* Fixes more

* Fixes chainspec

* Adds contracts back

* Update service

* Add alice evm account.

* Fix include for FromStr.

* Reconfigure who gets genesis eth acct.

* Attempt to upgrade frontier version.

* Bump frontier version.

* Fix RPC build.

* Uses CW frontier fork, updates to node

* Fix chain spec to provide alice balance.

* Bump frontier and add web3 tools.

* Remove truffle folder, see uniswap-deployer.

* Change ETH ChainId to 7.

* Revert "Change ETH ChainId to 7."

This reverts commit 1b2fe87.

* Adds weights for balances + democracy, removes warnings

* Removes node-runtime and node-executor

* Bump version for debug logs. (#228)

Co-authored-by: Jake Naviasky <jake@commonwealth.im>

* Adds precompiles

* update lock

* Update submodule and frontier fork (#229)

* Update submodulel

* Peg submodule to branch

* Lock updates

* Updates frontier fork, using time-travel branch

* Update frontier submodule

* Update EthereumApi runtime.

* Fix RPC build.

* Update frontier submod

* Add ups

* Add NetApi and frontier consensus.

* Uses frontier block import

* Updates frontier submod

* Update to frontier master.

* Bump frontier version.

* Add static config to increase contract size.

* Shift frontier reference to local changes.

* Add precompiles at addresses

* Update build to newest frontier.

* Fixes precompile address resolution

* Swap frontier to cw branch.

* Removes 0 from address to have proper length

* Removes warnings

* Bump frontier version.

* 2.0.0 node

* Fixes warnings, sets up identity migration

* Adds runtime  interface back for back-compat

* Added Dockerfile for Remote Cargo (#242)

* for purpose of tutorials its needed in the develop branch as well, should be same as PR#237

* updated readme

Co-authored-by: Drew Stone <drewstone329@gmail.com>

* Adds grandpa support template for grandpa restart

* Add grandpa pause vars

* Ups commit, adds assets

* Add grandpa pause authority list, debugging

* Removes grandpa pause work into new branch and ups deps/versions

* fixes overwritten treasury params

* Colon fix

Co-authored-by: Jake Naviasky <jake@commonwealth.im>
Co-authored-by: Matej Nemček <5887929+yangwao@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 7, 2020
1 parent f2b9d46 commit 7512597
Show file tree
Hide file tree
Showing 55 changed files with 4,695 additions and 2,900 deletions.
3,891 changes: 2,050 additions & 1,841 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"node/rpc",
"node/rpc-client",
"node/runtime",
"node/testing",
]

[profile.release]
Expand Down
14 changes: 7 additions & 7 deletions modules/edge-signaling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ serde = { version = "1.0", default-features = false, optional = true }
serde_derive = { version = "1.0", optional = true }
safe-mix = { version = "1.0", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-runtime = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
frame-support = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
frame-system = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-balances = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-std = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
sp-runtime = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
frame-support = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
frame-system = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-balances = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
voting = { package ="edge-voting", path = "../edge-voting", default-features = false }

[dev-dependencies]
sp-io = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-core = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-io = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
sp-core = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion modules/edge-signaling/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod tests;
use frame_support::traits::{Currency, Get, ReservableCurrency,};
use sp_std::prelude::*;

use frame_system::{self as system, ensure_signed};
use frame_system::{ensure_signed};
use frame_support::{dispatch::DispatchResult, weights::Weight};
use codec::{Decode, Encode};

Expand Down
5 changes: 4 additions & 1 deletion modules/edge-signaling/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ impl frame_system::Trait for Test {
type MaximumBlockLength = MaximumBlockLength;
type AvailableBlockRatio = AvailableBlockRatio;
type Version = ();
type ModuleToIndex = ();
type AccountData = pallet_balances::AccountData<u128>;
type OnNewAccount = ();
type MigrateAccount = ();
type OnKilledAccount = ();
type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
type PalletInfo = ();
type SystemWeightInfo = ();
}

parameter_types! {
Expand All @@ -86,6 +87,8 @@ impl pallet_balances::Trait for Test {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = frame_system::Module<Test>;
type WeightInfo = ();
type MaxLocks = ();
}

impl voting::Trait for Test {
Expand Down
28 changes: 15 additions & 13 deletions modules/edge-treasury-reward/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ edition = "2018"
serde = { version = "1.0", default-features = false, optional = true }
safe-mix = { version = "1.0", default-features = false }
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-runtime = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
frame-support = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
frame-system = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-staking = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-balances = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-treasury = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-std = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
sp-runtime = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
frame-support = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
frame-system = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-authorship = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-staking = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-balances = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-treasury = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }

[dev-dependencies]
sp-io = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-staking = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-core = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-staking-reward-curve = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-session = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
pallet-timestamp = { git = "https://github.com/hicommonwealth/substrate.git", default-features = false }
sp-io = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
sp-staking = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
sp-core = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-staking-reward-curve = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-session = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }
pallet-timestamp = { git = "https://github.com/hicommonwealth/substrate.git", branch = "develop", default-features = false }

[features]
default = ["std"]
Expand All @@ -32,6 +33,7 @@ std = [
"codec/std",
"sp-std/std",
"sp-runtime/std",
"pallet-authorship/std",
"pallet-balances/std",
"frame-support/std",
"frame-system/std",
Expand Down
2 changes: 1 addition & 1 deletion modules/edge-treasury-reward/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use sp_std::prelude::*;
use sp_runtime::traits::{Zero};

use frame_support::{decl_event, decl_module, decl_storage};
use frame_system::{self as system, ensure_root};
use frame_system::{ensure_root};
pub type BalanceOf<T> = <<T as pallet_staking::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;

pub trait Trait: pallet_staking::Trait + pallet_treasury::Trait + pallet_balances::Trait {
Expand Down
Loading

0 comments on commit 7512597

Please sign in to comment.