-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat/pallet anchor #436
Feat/pallet anchor #436
Conversation
Signed-off-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Nahu <39748285+nahuseyoum@users.noreply.github.com>
Signed-off-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: nahuseyoum <nahu.seyoum@aventus.io> Co-authored-by: Nahu <39748285+nahuseyoum@users.noreply.github.com>
e973556
to
45f7c87
Compare
}); | ||
} | ||
|
||
// #[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.
Is this test being kept?
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 think it should be ok to have multiple chain names because the handler and chainId will be different so we can remove this test. But I would prefer to merge as is and then do a separate PR to remove it.
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.
why check in, commented out code?
impl InnerCallValidator for TestAvnProxyConfig { | ||
type Call = RuntimeCall; | ||
|
||
fn signature_is_valid(call: &Box<Self::Call>) -> bool { |
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.
Why do we need Box? Why not just &Self::Call
?
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.
Because the size of Call is unknown (it can be any call to the runtime) and boxing it gives it a known size (the size of the pointer to the heap)
impl<T: Config> InnerCallValidator for Pallet<T> { | ||
type Call = <T as Config>::RuntimeCall; | ||
|
||
fn signature_is_valid(call: &Box<Self::Call>) -> bool { |
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.
As above
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.
PR title needs updating
|
||
pub type ChainId = u32; | ||
#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] | ||
#[scale_info(skip_type_params(T))] |
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.
why do we need this?
|
||
#[pallet::storage] | ||
#[pallet::getter(fn checkpoints)] | ||
pub type Checkpoints<T: Config> = StorageDoubleMap< |
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.
what is the benefit of having different Nonce/CheckpointID per chain? wouldn't a universal nonce for all checkpoints be simpler?
}); | ||
} | ||
|
||
// #[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.
why check in, commented out code?
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.
was this intended to check in?
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.
no
Proposed changes
Functionality for anchoring to the avn chain, encapsulated in a single pallet
Type of change/Merge
🚨What type of change is this PR?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR.Further comments