Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency (Substrate/Polkadot/Frontier/Cumulus/...) update to v0.9.40 #2202

Merged
merged 67 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
6d394d0
update to v0.9.40
nbaztec Apr 1, 2023
d26b671
update benchmarking weight template
nbaztec Apr 3, 2023
2821987
fix build
nbaztec Apr 3, 2023
1ed2a6d
make test compile
nbaztec Apr 3, 2023
fb2df2a
Includes page heap fixes
crystalin Apr 5, 2023
c9c9faf
compile runtime-benchmarks
nbaztec Apr 18, 2023
02b81f3
Merge branch 'upgrade-v0.9.40' of github.com:PureStake/moonbeam into …
nbaztec Apr 18, 2023
2882824
make warp sync work
nbaztec Apr 19, 2023
7fd8681
merge master
nbaztec Apr 19, 2023
a723757
toml sort
nbaztec Apr 19, 2023
471a4d2
fix editorconfig
nbaztec Apr 19, 2023
e10550f
use new substrate version
nbaztec Apr 19, 2023
0fb006c
fix warp sync
nbaztec Apr 21, 2023
7d58b9d
merge conflicts
nbaztec Apr 21, 2023
d76bc6b
sort
nbaztec Apr 21, 2023
a4b0848
fix --dev
nbaztec Apr 25, 2023
0e45f47
remove duplicate SetMembersOrigin
nbaztec Apr 25, 2023
56ae6f8
toml-sort
nbaztec Apr 25, 2023
0ccee4a
remove kitchensink-runtime
nbaztec Apr 27, 2023
7da9ed8
fix builkd
nbaztec Apr 27, 2023
a1dead6
Merge branch 'master' into upgrade-v0.9.40
nbaztec Apr 28, 2023
eea7baa
use new weights
nbaztec Apr 28, 2023
aa5e0cc
Merge branch 'master' into upgrade-v0.9.40
nbaztec May 2, 2023
8091cee
set manual weights for xcm fungible
librelois May 2, 2023
817adaa
use Weight::from_parts
nbaztec May 3, 2023
f329f16
Merge branch 'upgrade-v0.9.40' of github.com:PureStake/moonbeam into …
nbaztec May 3, 2023
d41c37a
use 0 pov_size for ref_time weight
nbaztec May 3, 2023
6dbca4e
update nimbus
nbaztec May 3, 2023
d8136c1
exclude generated weight files from editorconfig
nbaztec May 4, 2023
5e801c5
fmt
nbaztec May 4, 2023
466953f
fmt
nbaztec May 4, 2023
57387ca
fix rust tests
nbaztec May 4, 2023
c3917d3
Merge branch 'master' into upgrade-v0.9.40
nbaztec May 4, 2023
2bfe372
fix import
nbaztec May 4, 2023
62df5a7
fix tests
nbaztec May 4, 2023
1527111
use Weight part pov_size to 0
nbaztec May 4, 2023
18aa311
make dalek test work
nbaztec May 5, 2023
f5f5e76
fix transfer tests
nbaztec May 8, 2023
4f94a30
merge master
nbaztec May 11, 2023
f3ab63d
use BoundedVec for auto compound delegations
nbaztec May 12, 2023
e42730c
fix modexp test
nbaztec May 12, 2023
9927390
fix modexp test
nbaztec May 12, 2023
fec3ec1
fix tests
nbaztec May 15, 2023
bcb720c
fix weight tests
nbaztec May 15, 2023
648606b
Merge branch 'upgrade-v0.9.40' of github.com:PureStake/moonbeam into …
nbaztec May 15, 2023
e7dd0a1
fix staking tests via chunking
nbaztec May 15, 2023
fde72fd
fix modexp test
nbaztec May 15, 2023
19b4228
fix lint and test
nbaztec May 15, 2023
8dff3c7
fix rust weight tests
nbaztec May 15, 2023
d243bb5
fix partial ts tests
nbaztec May 15, 2023
cd87118
Merge branch 'master' into upgrade-v0.9.40
crystalin May 15, 2023
b3049e7
temp fix for xcm v2
crystalin May 15, 2023
df27699
Fixes weight until benchmarking is fixed
crystalin May 16, 2023
7ef16e7
set manual weight, fix ts tests
nbaztec May 16, 2023
6669928
Adds temp hack for xcm tests
crystalin May 22, 2023
0d1f026
Use RefundSurplus as the no-op for saturating the queue, which does n…
girazoki May 23, 2023
882b85e
Update evm to 0.39
tgmichel May 23, 2023
389f757
Revert "Update evm to 0.39"
tgmichel May 23, 2023
d831644
upgrade polkadot for better support of xcm v2
librelois May 23, 2023
63c005a
prettier
librelois May 23, 2023
ea906b9
prettier
librelois May 23, 2023
f7d6b37
Revert temp fix for XCM weight
crystalin May 23, 2023
f54cc1b
upgrade polkadot fork
librelois May 23, 2023
6c044fc
Fixing hrmp-mock tests
girazoki May 24, 2023
1608234
clean up
girazoki May 24, 2023
a874fc4
Merge branch 'master' into upgrade-v0.9.40
librelois May 25, 2023
0ca0b68
prettier
librelois May 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 54 additions & 30 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
exclude = [ "bin/utils/moonkey" ]
exclude = ["bin/utils/moonkey"]
members = [
"bin/utils/moonkey",
"client/rpc/finality",
Expand Down Expand Up @@ -42,7 +42,7 @@ members = [
resolver = "2"

[workspace.package]
authors = [ "PureStake" ]
authors = ["PureStake"]
repository = "https://github.com/PureStake/moonbeam"

[workspace.dependencies]
Expand Down Expand Up @@ -226,11 +226,11 @@ ethereum = { version = "0.14.0", default-features = false, features = [
"with-codec",
] }
ethereum-types = { version = "0.14", default-features = false }
evm = { version = "0.37.0", default-features = false, features = [
evm = { version = "0.39.0", default-features = false, features = [
"with-codec",
] }
evm-gasometer = { version = "0.37.0", default-features = false }
evm-runtime = { version = "0.37.0", default-features = false }
evm-gasometer = { version = "0.39.0", default-features = false }
evm-runtime = { version = "0.39.0", default-features = false }
fp-ethereum = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.40", default-features = false }
fp-evm = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.40", default-features = false }
fp-rpc = { git = "https://github.com/purestake/frontier", branch = "moonbeam-polkadot-v0.9.40", default-features = false }
Expand Down Expand Up @@ -333,7 +333,7 @@ serde = { version = "1.0.101", default-features = false }
sha3 = { version = "0.10", default-features = false }
slices = "0.2.0"
smallvec = "1.8.0"
strum = { version = "0.24", default-features = false, features = [ "derive" ] }
strum = { version = "0.24", default-features = false, features = ["derive"] }
strum_macros = "0.24"

# Other (client)
Expand All @@ -343,7 +343,7 @@ async-io = "1.3"
bip32 = { git = "https://github.com/purestake/crates", branch = "bip32-v0.4.0-fix", default-features = false, features = [
"bip39",
] }
clap = { version = "4.0.9", features = [ "derive" ] }
clap = { version = "4.0.9", features = ["derive"] }
exit-future = "0.2"
flume = "0.10.9"
futures = { version = "0.3.21" }
Expand Down
22 changes: 13 additions & 9 deletions precompiles/precompile-registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ mod mock;
mod tests;

use core::marker::PhantomData;
use fp_evm::PrecompileSet;
use precompile_utils::{precompile_set::IsActivePrecompile, prelude::*};
use fp_evm::{ExitError, IsPrecompileResult, PrecompileFailure, PrecompileSet};
use precompile_utils::{precompile_set::{is_precompile_or_fail, IsActivePrecompile}, prelude::*};
use sp_core::Get;

const DUMMY_CODE: [u8; 5] = [0x60, 0x00, 0x60, 0x00, 0xfd];
Expand All @@ -41,9 +41,7 @@ where
fn is_precompile(handle: &mut impl PrecompileHandle, address: Address) -> EvmResult<bool> {
// We consider the precompile set is optimized to do at most one storage read.
handle.record_cost(RuntimeHelper::<Runtime>::db_read_gas_cost())?;

let active = <Runtime::PrecompilesValue>::get().is_precompile(address.0);
Ok(active)
is_precompile_or_fail::<Runtime>(address.0, handle.remaining_gas())
}

#[precompile::public("isActivePrecompile(address)")]
Expand All @@ -54,9 +52,15 @@ where
) -> EvmResult<bool> {
// We consider the precompile set is optimized to do at most one storage read.
handle.record_cost(RuntimeHelper::<Runtime>::db_read_gas_cost())?;

let active = <Runtime::PrecompilesValue>::get().is_active_precompile(address.0);
Ok(active)
match <Runtime::PrecompilesValue>::get().is_active_precompile(address.0, handle.remaining_gas()) {
IsPrecompileResult::Answer {
is_precompile,
..
} => Ok(is_precompile),
IsPrecompileResult::OutOfGas => Err(PrecompileFailure::Error {
exit_status: ExitError::OutOfGas
})
}
}

#[precompile::public("updateAccountCode(address)")]
Expand All @@ -68,7 +72,7 @@ where
handle.record_cost(RuntimeHelper::<Runtime>::db_write_gas_cost())?;

// Prevent touching addresses that are not precompiles.
if !<Runtime::PrecompilesValue>::get().is_precompile(address.0) {
if !is_precompile_or_fail::<Runtime>(address.0, handle.remaining_gas())? {
return Err(revert("provided address is not a precompile"));
}

Expand Down
6 changes: 3 additions & 3 deletions precompiles/proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ pub struct EvmSubCall {
pub trait EvmProxyCallFilter: Sized + Send + Sync {
/// If returns `false`, then the subcall will not be executed and the evm transaction will
/// revert with error message "CallFiltered".
fn is_evm_proxy_call_allowed(&self, _call: &EvmSubCall, _recipient_has_code: bool) -> bool {
false
fn is_evm_proxy_call_allowed(&self, _call: &EvmSubCall, _recipient_has_code: bool, _gas: u64) -> EvmResult<bool> {
Ok(false)
}
}

Expand Down Expand Up @@ -352,7 +352,7 @@ where
// Apply proxy type filter
frame_support::ensure!(
def.proxy_type
.is_evm_proxy_call_allowed(&evm_subcall, recipient_has_code),
.is_evm_proxy_call_allowed(&evm_subcall, recipient_has_code, handle.remaining_gas())?,
revert("CallFiltered")
);

Expand Down
Loading