Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
49de894
pallet-xvm refactor.
shaunxw Jul 20, 2023
5ea897c
Add TODOs.
shaunxw Jul 20, 2023
57ad0c9
Update design.
shaunxw Jul 20, 2023
46263d2
Keep XVM call interface unified.
shaunxw Jul 20, 2023
5c79244
Renaming.
shaunxw Jul 20, 2023
2a81a2d
update & integration.
shaunxw Jul 25, 2023
e576f74
Update xvm precompiles mock & tests.
shaunxw Jul 25, 2023
401cf8c
Replace 'UnknownError' with concrete errors.
shaunxw Jul 26, 2023
e410631
Update CE & precompile.
shaunxw Jul 26, 2023
819c7f8
Clean up.
shaunxw Jul 26, 2023
50c04b2
Benchmarks and mock.
shaunxw Jul 26, 2023
eed8ce4
Merge branch 'master' into feat/pallet-xvm-refactor
shaunxw Jul 26, 2023
6b22ce6
Updates for polkadot-v0.9.43.
shaunxw Jul 26, 2023
61220e6
Fix benchmarks.
shaunxw Jul 26, 2023
7b92705
Add benchmarking result and weight info.
shaunxw Jul 26, 2023
8831ba9
Add license header to weight.rs.
shaunxw Jul 26, 2023
5666403
Add pallet description docstring.
shaunxw Jul 27, 2023
df8e062
Record gas cost in XVM precompile.
shaunxw Jul 27, 2023
34a3942
Less weight is available with overheads cost.
shaunxw Jul 27, 2023
e9ccd4b
Trace Ethereum transact result.
shaunxw Jul 27, 2023
cd5d2af
Handle record cost result.
shaunxw Jul 27, 2023
8d4f62e
Bump Shibuya semver and spec versoin.
shaunxw Jul 27, 2023
7482e7b
Apply review suggestions.
shaunxw Jul 27, 2023
3fa315e
Update with new benchmarking result.
shaunxw Jul 27, 2023
931117c
Improve XVM call benchmarking.
shaunxw Jul 27, 2023
ff3b41f
Make local/shibuya/shiden/astar runtimes and client have the same sem…
shaunxw Jul 27, 2023
f6a81fa
Update with new benchmarking result.
shaunxw Jul 27, 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
Prev Previous commit
Next Next commit
Clean up.
  • Loading branch information
shaunxw committed Jul 26, 2023
commit 819c7f8e17f794a6d7fcd763643fa52f5ff1333a
1 change: 0 additions & 1 deletion Cargo.lock

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

11 changes: 6 additions & 5 deletions pallets/xvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::{pallet_prelude::*, traits::ConstU32, BoundedVec};
use frame_support::{ensure, pallet_prelude::*, traits::ConstU32, BoundedVec};
use pallet_evm::GasWeightMapping;
use parity_scale_codec::Decode;
use sp_core::U256;
Expand Down Expand Up @@ -90,12 +90,13 @@ impl<T: Config> Pallet<T> {
input: Vec<u8>,
skip_execution: bool,
) -> XvmCallResult {
if context.source_vm_id == vm_id {
return Err(CallErrorWithWeight {
ensure!(
context.source_vm_id != vm_id,
CallErrorWithWeight {
error: CallError::SameVmCallNotAllowed,
used_weight: PLACEHOLDER_WEIGHT,
});
}
}
);

match context.source_vm_id {
VmId::Evm => Pallet::<T>::evm_call(context, source, target, input, skip_execution),
Expand Down
1 change: 0 additions & 1 deletion precompiles/xvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ serde = { workspace = true }
precompile-utils = { workspace = true, features = ["testing"] }

pallet-balances = { workspace = true, features = ["std"] }
pallet-contracts = { workspace = true, features = ["std"] }
pallet-timestamp = { workspace = true }
sp-runtime = { workspace = true }

Expand Down