Skip to content

Commit

Permalink
Update substrate to 4ea2ac8 (paritytech#743)
Browse files Browse the repository at this point in the history
Signed-off-by: koushiro <[email protected]>
  • Loading branch information
koushiro authored Jul 18, 2022
1 parent 9981a1f commit cb041f1
Show file tree
Hide file tree
Showing 9 changed files with 412 additions and 276 deletions.
640 changes: 386 additions & 254 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/rpc-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ serde_json = "1.0"

# Parity
ethereum-types = "0.13.1"
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }
rlp = "0.5"
2 changes: 1 addition & 1 deletion client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tokio = { version = "1.19", features = ["sync"] }
# Parity
codec = { package = "parity-scale-codec", version = "3.0.0" }
ethereum-types = "0.13.1"
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }
libsecp256k1 = "0.7"
rlp = "0.5"

Expand Down
4 changes: 2 additions & 2 deletions frame/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use fp_storage::{EthereumStorageSchema, PALLET_ETHEREUM_SCHEMA};
#[cfg(feature = "try-runtime")]
use frame_support::traits::OnRuntimeUpgradeHelpersExt;
use frame_support::{
codec::{Decode, Encode},
codec::{Decode, Encode, MaxEncodedLen},
dispatch::DispatchResultWithPostInfo,
scale_info::TypeInfo,
traits::{EnsureOrigin, Get, PalletInfoAccess},
Expand All @@ -64,7 +64,7 @@ pub use ethereum::{
};
pub use fp_rpc::TransactionStatus;

#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
pub enum RawOrigin {
EthereumTransaction(H160),
}
Expand Down
1 change: 1 addition & 0 deletions frame/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ impl<T: Config> Pallet<T> {
}

<AccountCodes<T>>::remove(address);
#[allow(deprecated)]
let _ = <AccountStorages<T>>::remove_prefix(address, None);
}

Expand Down
1 change: 1 addition & 0 deletions frame/evm/src/runner/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ where
}

fn reset_storage(&mut self, address: H160) {
#[allow(deprecated)]
let _ = <AccountStorages<T>>::remove_prefix(address, None);
}

Expand Down
2 changes: 1 addition & 1 deletion template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ log = "0.4.17"

# Parity
codec = { package = "parity-scale-codec", version = "3.1", features = ["derive"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }

# Substrate
sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
11 changes: 6 additions & 5 deletions template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use frontier_template_runtime::{
AccountId, AuraConfig, BalancesConfig, EVMConfig, EthereumConfig, GenesisConfig, GrandpaConfig,
Signature, SudoConfig, SystemConfig, WASM_BINARY,
};
use frontier_template_runtime::{AccountId, GenesisConfig, Signature, WASM_BINARY};
use sc_service::ChainType;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{sr25519, Pair, Public, H160, U256};
Expand Down Expand Up @@ -136,6 +133,9 @@ fn testnet_genesis(
endowed_accounts: Vec<AccountId>,
_enable_println: bool,
) -> GenesisConfig {
use frontier_template_runtime::{
AuraConfig, BalancesConfig, EVMConfig, GrandpaConfig, SudoConfig, SystemConfig,
};
GenesisConfig {
system: SystemConfig {
// Add Wasm runtime to storage.
Expand All @@ -149,6 +149,7 @@ fn testnet_genesis(
.map(|k| (k, 1 << 60))
.collect(),
},
transaction_payment: Default::default(),
aura: AuraConfig {
authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
},
Expand Down Expand Up @@ -196,7 +197,7 @@ fn testnet_genesis(
map
},
},
ethereum: EthereumConfig {},
ethereum: Default::default(),
dynamic_fee: Default::default(),
base_fee: Default::default(),
}
Expand Down
25 changes: 13 additions & 12 deletions template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = IdentityFee<Balance>;
Expand Down Expand Up @@ -394,18 +395,18 @@ construct_runtime!(
NodeBlock = opaque::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Aura: pallet_aura::{Pallet, Config<T>},
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>},
Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Config, Origin},
EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>},
DynamicFee: pallet_dynamic_fee::{Pallet, Call, Storage, Config, Inherent},
BaseFee: pallet_base_fee::{Pallet, Call, Storage, Config<T>, Event},
HotfixSufficients: pallet_hotfix_sufficients::{Pallet, Call},
System: frame_system,
Timestamp: pallet_timestamp,
Aura: pallet_aura,
Grandpa: pallet_grandpa,
Balances: pallet_balances,
TransactionPayment: pallet_transaction_payment,
Sudo: pallet_sudo,
Ethereum: pallet_ethereum,
EVM: pallet_evm,
DynamicFee: pallet_dynamic_fee,
BaseFee: pallet_base_fee,
HotfixSufficients: pallet_hotfix_sufficients,
}
);

Expand Down

0 comments on commit cb041f1

Please sign in to comment.