-
Notifications
You must be signed in to change notification settings - Fork 68
[MD-1066] Container chain sending tokens to Ethereum #1100
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
base: jeremy-send-tokens-to-ethereum
Are you sure you want to change the base?
[MD-1066] Container chain sending tokens to Ethereum #1100
Conversation
- Updated xcm message
- Moved test to zombienet setup
- Updated sender
/// to is the Ethereum mainnet, with chain ID 1. | ||
/// <https://chainlist.org/chain/1> | ||
/// <https://ethereum.org/en/developers/docs/apis/json-rpc/#net_version> | ||
pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 11155111 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to find a way to pull it from the relay chain, because it should work for both: dancelight/stagelight runtimes.
Or maybe add here EthTestnet and EthMainnet and check for OR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add the runtime api to relay chain that will return the ETH NetworkId of the relay chain and then call this api before the validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or fetch it via the XCM message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe having a testnet/mainnet flag could be useful for other things. But it adds an extra step to the deploy process... How can we make it automatic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea: we could also have this EthereumNetwork
as a param of pallet_parameters
, and that way we would be able to modify it accordingly. This wouldn't be automatic tho, we can set a default value (e.g the testnet one) but if we want to change it in a mainnet environment, it should be done by calling the extrinsic.
- Extended e2e tests - Mocked the barrier - Added documentation
chains/orchestrator-relays/runtime/dancelight/src/xcm_config.rs
Outdated
Show resolved
Hide resolved
@@ -327,6 +327,30 @@ impl<T: frame_system::Config> WeightInfo<T> { | |||
// Minimum execution time: 1_199_000 picoseconds. | |||
Weight::from_parts(1_243_000, 0) | |||
} | |||
// Storage: `ParachainInfo::ParachainId` (r:1 w:0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took it from BridgeHub for now, we will need to re-generate it on our side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, to generate our own benchmarks for ExportMessage
we will need to adapt a few configurations for our implementation of pallet_xcm_benchmarks
, like these ones:
@@ -52,25 +51,3 @@ fn test_message_exporter_disabled_for_origin_account() { | |||
); | |||
}); | |||
} | |||
|
|||
#[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this test, because we now using the MessageExporter
- Return NotApplicable in validate function
chains/orchestrator-relays/runtime/dancelight/src/xcm_config.rs
Outdated
Show resolved
Hide resolved
…into (3)-MD-1066-evgeny-container-to-eth-xcm # Conflicts: # primitives/bridge/src/lib.rs
…-container-to-eth-xcm # Conflicts: # chains/orchestrator-relays/runtime/dancelight/src/xcm_config.rs
…-container-to-eth-xcm
WASM runtime size check:Compared to target branchdancebox runtime: 1500 KB (no changes) ✅ flashbox runtime: 884 KB (no changes) ✅ dancelight runtime: 2408 KB (+4 KB) 🚨 starlight runtime: 2312 KB (+4 KB) container chain template simple runtime: 1160 KB (-4 KB) ✅ container chain template frontier runtime: 1448 KB (+4 KB) |
Description:
This PR provides a functionality for container chains to send tokens to Ethereum via the Relay chain
NOTE:
Should be merged after #1054
The plan: