-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add runtime for eth relay domain #1203
Conversation
23fbfda
to
7faba17
Compare
7faba17
to
9e78000
Compare
9e78000
to
72effe8
Compare
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.
Looks fine overall.
I'd like to get feedback from @liuchengxu though.
Just some minor nits here.
|
||
impl pallet_ethereum_beacon_client::Config for Runtime { | ||
type RuntimeEvent = RuntimeEvent; | ||
// TODO: Replace this with pallet_timestamp once core domains support inherent extrinsics |
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.
I'm not sure they ever will. Execution is deterministic, timestamp must come from the consensus chain block then.
Messenger: pallet_messenger = 6, | ||
Transporter: pallet_transporter = 7, |
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.
@vedhavyas looks like we'll want this indices to be constants, otherwise feels fragile. Maybe even some integration test if we have infra for that.
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.
I dont like it as well. We were already bitten by it. I have a plan to have a safer approach soon that should remove this dependency.
But then yes, maybe constant should be deterrent until then
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.
Make sense.
I wish rename from eth-relay to cor-eth-relay was part of the first commit only.
use subspace_runtime_primitives::{SHANNON, SSC}; | ||
|
||
#[cfg(any(feature = "std", test))] | ||
pub use sp_runtime::BuildStorage; |
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.
not sure if we are using this anywhere
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.
This was copied from core-payments
runtime.
Upon investigation, It is indeed not in use both here as well as in core-payments
. Maybe it is worth removing from core-payments
. I have removed it from here.
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.
Make sense overall!
Regarding the timestamp, I'm unsure about the entire context, we can discuss how to support it if you can share more background and requirement somewhere.
Description
This PR adds runtime for ethereum relay domain.
The runtime is not integrated in the node in this PR. I will be opening separate PR for that.
Closes #1204
Code contributor checklist: