-
Notifications
You must be signed in to change notification settings - Fork 248
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 contract creation allow lists to EVM domains #3350
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Will review this today.
Will think on more and add here |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
pub struct CheckContractCreation; | ||
|
||
impl SignedExtension for CheckContractCreation { | ||
const IDENTIFIER: &'static str = "CheckContractCreation"; |
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.
Can we move this Extension to the pallet itself?
This also makes sense to me, as we can use this extension in the test evm runtime too, and we can write integration test for it.
Also ideal if we change the name of pallet to something more alighed with new changes
maybe just pallet-evm-tracker ?
It is okay to change the crate name but notice we can't change the pallet name in the runtime, because the pallet name is used to construct the storage key changing it make break compatibility with the existing evm domain on Taurus
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@@ -161,7 +162,7 @@ pub type BlockTreeNodeFor<T> = crate::block_tree::BlockTreeNode< | |||
>; | |||
|
|||
/// The current storage version. | |||
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); |
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 due to Taurus being on storage version 2 already ?
@@ -136,7 +136,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { | |||
spec_name: Cow::Borrowed("subspace"), | |||
impl_name: Cow::Borrowed("subspace"), | |||
authoring_version: 0, | |||
spec_version: 2, |
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.
lets not bump this yet.
I do a see a new problem with maintaing a new branch for taurus @dariolina
Apart from the spec_versin, there is also sometime storge versions for each pallet that involves migrations. This will problematic when we have a seperate branch for Taurus.
I still think having a single source of truth with same spec_version would be most non-confusing way to go
This PR adds a pallet which filters ethereum contract creation using an allow list. The allow list can be updated by the domain sudo account.
By default, all accounts can create contracts, to maintain compatibility with existing EVM domains. But the chainspec can be configured with an initial allow list of accounts. For our "private" EVM, that will be the domain sudo.
Close #3344.
I couldn't work out how to do a dynamic check for the domain sudo inside the pallet or runtime. I'm not sure if that's needed, because we can add the sudo account in the chainspec, or they can add themselves to the list using the (sudo) call provided by the pallet.
Part of #3353.
Code contributor checklist: