-
Notifications
You must be signed in to change notification settings - Fork 539
Support external account provider #1329
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
Support external account provider #1329
Conversation
|
Some context: this implementation has been used by the Humanode network for a while now, and we got tired of maintaining these patches in our own fork. It is our hope to merge this in the upstream such that:
|
Totally understand. I think it would be possible to accept the changes that abstract the operations related to the account into a pallet config(trait), but it makes no sense to include the |
|
This would work for us. The reason why we are adding So, the main rationale for merging both is to actually ensure the code doesn't break. There are a lot of other things we'd suggest upstreaming, like a custom |
|
@boundless-forest @crystalin @koushiro any updates ? Will be ready to rebase after getting your feedback as I would like to merge it. |
I reviewed your solution regarding the
As for the chains with H160 account systems as the default, since they do not require account mapping, your solution does not change the way they operate. The Frontier repo lacks reviewers and maintainers. I'm also quite frustrated about this. We need more people involved in the issue and PR discussions. |
There is a huge difference in that with separate account systems there is no trying to retrofit AccountId20 into AccountId32, and also no possibility of the confusing interactions between other pallets and EVM - EVM accounts are completely isolated in their own system, with only explicitly implemented pathways to interact with the native system.
This is not intended to be deployed to either preexisting chains - neither for the ones using the mixed accounts in the system table with the EVM address mappings, not for the ones using the EVM-native AccountId20 as AccountId. This is for the new chains, and for Humanode which is running this setup in mainnet for a couple years now.
This solution does not replace the account mappings though - they can still be used; we wanted it explicitly because we dislike the mappings system and the implications of mixing those with respect to the RPCs and our (Huamnode) chain's sybil-attack mechanisms.
Yep. For the mixed accounts too - this adds an entirely new way to set things up. You can inspect how this works in practice at Humanode chain:
Upstreaming this is really important to us, as we plan to further expand our investment into Frontier codebase and having too many custom patches is starting to slow us down. For instance, we'd be interested in working on proper EVM tracing support - but currently we're stalled by this upstreaming.
We could aid acting act in this capacity at some point in the future as our involvement in Frontier and resource capacity grows. |
Considering that many chains have been setup based on the current path and have been running in production for several years. I suggest we merge these traits so your team doesn't need to maintain and pick during the frontier upgrade process. For the I suggest submitting an issue to gather feedback from the community members regarding your team's solution the evm-system and evm-balances. If many believe this is a preferable, we can consider including it in this repo. |
|
@boundless-forest @MOZGIII Just merged master including conflict resolution. Looks like we've agreed on merging account abstraction. For the |
157661e to
6c97cbc
Compare
This reverts commit d21ddc2.
* Introduce account provider interface * Use AccountProvider logic at pallet-evm * Remove redundant ower type usage * Fix fmt * Fix clippy * Fix clippy * License at primitives/evm/src/account_provider.rs * Rename NativeSystemAccountProvider to FrameSystemAccountProvider * Formatting corrcetions at account_provider.rs --------- Co-authored-by: MOZGIII <[email protected]>
This reverts commit d21ddc2.
* Introduce account provider interface * Use AccountProvider logic at pallet-evm * Remove redundant ower type usage * Fix fmt * Fix clippy * Fix clippy * License at primitives/evm/src/account_provider.rs * Rename NativeSystemAccountProvider to FrameSystemAccountProvider * Formatting corrcetions at account_provider.rs --------- Co-authored-by: MOZGIII <[email protected]>
This reverts commit d21ddc2.
* Introduce account provider interface * Use AccountProvider logic at pallet-evm * Remove redundant ower type usage * Fix fmt * Fix clippy * Fix clippy * License at primitives/evm/src/account_provider.rs * Rename NativeSystemAccountProvider to FrameSystemAccountProvider * Formatting corrcetions at account_provider.rs --------- Co-authored-by: MOZGIII <[email protected]>
…ontier#1142), Support external account provider (polkadot-evm/frontier#1329)
This reverts commit d21ddc2.
* Introduce account provider interface * Use AccountProvider logic at pallet-evm * Remove redundant ower type usage * Fix fmt * Fix clippy * Fix clippy * License at primitives/evm/src/account_provider.rs * Rename NativeSystemAccountProvider to FrameSystemAccountProvider * Formatting corrcetions at account_provider.rs --------- Co-authored-by: MOZGIII <[email protected]>
…ontier#1142), Support external account provider (polkadot-evm/frontier#1329)
* NODE-161, deps: update to stable2503 * NODE-161, fix: node: Replace TxPool RPC with Frontier implementation #moonbeam-foundation/moonbeam#3218 * NODE-161, fix: runtime: Fix weight limits in evm tracing runtimes (moonbeam-foundation/moonbeam#3210) * NODE-161, deps: update Cargo * NODE-161, fix: Use DecodeWithMemTracking (paritytech/polkadot-sdk#7360) * NODE-161, feat: runtime: upgrade to EIP-7702 new APIs * NODE-161, Introduce a gas-based Storage limit per tx (polkadot-evm/frontier#1142), Support external account provider (polkadot-evm/frontier#1329) * NODE-161, fix: remove sc_transaction_pool * NODE-161, fix: add missing crates * NODE-161, fix: resolve typo * NODE-161, fix: remove Paramter * NODE-161, feat: Allow whitleisting contract deployer (polkadot-evm/frontier#1629) * NODE-161, feat: Update Treasury to Support Relay Chain Block Number Provider (paritytech/polkadot-sdk#3970) * NODE-161, feat: [Identity] Decouple usernames from identities (paritytech/polkadot-sdk#5554) * NODE-161, feat: Collective: dynamic deposit based on number of proposals (paritytech/polkadot-sdk#3151) * NODE-161, fix: add missing DecodeWithMemTracking * NODE-161, feat: Moves disabling logic into pallet-session (paritytech/polkadot-sdk#7581) * NODE-161, feat: Update Scheduler to have a configurable block provider (paritytech/polkadot-sdk#7441) * NODE-161, chore: add WeightInfo to pallet_transaction_payment * NODE-161, fix: add missing authorization_list * NODE-161, fix: replace to new_bare * NODE-161, fix: add missing DecodeWithMemTracking derive * NODE-161, fix: resolve type mismatch * NODE-161, fix: use system_version (paritytech/polkadot-sdk#4257) * NODE-161, fix: use Cow (paritytech/polkadot-sdk#5693) * NODE-161, feat: Generic slashing side-effects (paritytech/polkadot-sdk#5623) * NODE-161, feat: impl create_inherent (paritytech/polkadot-sdk#3685) * NODE-161, fix: remove generic parameter from on_unbalanceds * NODE-161, fix: update storage_at runtime api * NODE-161, fix: node: Remove network starter that is no longer needed (paritytech/polkadot-sdk#6400) * NODE-161, fix: node: update FullNetworkConfiguration params * NODE-161, fix: node: update TransactionPool * NODE-161, fix: node: substrate-offchain: upgrade hyper to v1 (paritytech/polkadot-sdk#5919) * NODE-161, fix: node: update service, rpc * NODE-161, chore: remove unused imports * chore: add cargo feature "metadata-hash" * NODE-161, fix: add cumulus primitives storage proof size HostFunctions * NODE-161, chore: update dependencies branch * NODE-161, chore: update to stable2506 * NODE-161, chore: remove `RuntimeEvent` from pallet::Config * NODE-161, fix: update test code * NODE-161, fix: make node-lts compatible * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, fix: use node.kill() * NODE-161, fix: resolve test codes * NODE-161, fix: remove console.log * NODE-161, chore: update tools package.json * feat: init blaze * fix: remove unused crate * import precompile-blaze * NODE-161, chore: add mbm migrator into runtimes * NODE-161, chore: add pallet_session migration * NODE-161, fix: new_full_parts -> new_full_parts_record_import * fix: resolve issues * NODE-161, deps: update runtime version (489) --------- Co-authored-by: dnjscksdn98 <[email protected]>
* Node 161 pectra update (#126) * NODE-161, deps: update to stable2503 * NODE-161, fix: node: Replace TxPool RPC with Frontier implementation #moonbeam-foundation/moonbeam#3218 * NODE-161, fix: runtime: Fix weight limits in evm tracing runtimes (moonbeam-foundation/moonbeam#3210) * NODE-161, deps: update Cargo * NODE-161, fix: Use DecodeWithMemTracking (paritytech/polkadot-sdk#7360) * NODE-161, feat: runtime: upgrade to EIP-7702 new APIs * NODE-161, Introduce a gas-based Storage limit per tx (polkadot-evm/frontier#1142), Support external account provider (polkadot-evm/frontier#1329) * NODE-161, fix: remove sc_transaction_pool * NODE-161, fix: add missing crates * NODE-161, fix: resolve typo * NODE-161, fix: remove Paramter * NODE-161, feat: Allow whitleisting contract deployer (polkadot-evm/frontier#1629) * NODE-161, feat: Update Treasury to Support Relay Chain Block Number Provider (paritytech/polkadot-sdk#3970) * NODE-161, feat: [Identity] Decouple usernames from identities (paritytech/polkadot-sdk#5554) * NODE-161, feat: Collective: dynamic deposit based on number of proposals (paritytech/polkadot-sdk#3151) * NODE-161, fix: add missing DecodeWithMemTracking * NODE-161, feat: Moves disabling logic into pallet-session (paritytech/polkadot-sdk#7581) * NODE-161, feat: Update Scheduler to have a configurable block provider (paritytech/polkadot-sdk#7441) * NODE-161, chore: add WeightInfo to pallet_transaction_payment * NODE-161, fix: add missing authorization_list * NODE-161, fix: replace to new_bare * NODE-161, fix: add missing DecodeWithMemTracking derive * NODE-161, fix: resolve type mismatch * NODE-161, fix: use system_version (paritytech/polkadot-sdk#4257) * NODE-161, fix: use Cow (paritytech/polkadot-sdk#5693) * NODE-161, feat: Generic slashing side-effects (paritytech/polkadot-sdk#5623) * NODE-161, feat: impl create_inherent (paritytech/polkadot-sdk#3685) * NODE-161, fix: remove generic parameter from on_unbalanceds * NODE-161, fix: update storage_at runtime api * NODE-161, fix: node: Remove network starter that is no longer needed (paritytech/polkadot-sdk#6400) * NODE-161, fix: node: update FullNetworkConfiguration params * NODE-161, fix: node: update TransactionPool * NODE-161, fix: node: substrate-offchain: upgrade hyper to v1 (paritytech/polkadot-sdk#5919) * NODE-161, fix: node: update service, rpc * NODE-161, chore: remove unused imports * chore: add cargo feature "metadata-hash" * NODE-161, fix: add cumulus primitives storage proof size HostFunctions * NODE-161, chore: update dependencies branch * NODE-161, chore: update to stable2506 * NODE-161, chore: remove `RuntimeEvent` from pallet::Config * NODE-161, fix: update test code * NODE-161, fix: make node-lts compatible * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, fix: use node.kill() * NODE-161, fix: resolve test codes * NODE-161, fix: remove console.log * NODE-161, chore: update tools package.json * feat: init blaze * fix: remove unused crate * import precompile-blaze * NODE-161, chore: add mbm migrator into runtimes * NODE-161, chore: add pallet_session migration * NODE-161, fix: new_full_parts -> new_full_parts_record_import * fix: resolve issues * NODE-161, deps: update runtime version (489) --------- Co-authored-by: dnjscksdn98 <[email protected]> * NODE-80 branch restructure (#127) * NODE-179, feat: init pallet storages * NODE-179, feat: init pallet extrinsics * NODE-179, chore: add locktime * NODE-179, feat: finalize fee rate * NODE-179, feature: impl coin selections * NODE-179, feat: check blaze activation state * NODE-179, feature: impl `remove_outbound_messages` for legacy mode * NODE-80: implement benchmarking (#121) * NODE-80, feature: impl benchmarking.rs & mock.rs * NODE-80, fix: benchmark * NODE-80, fix: benchmark * NODE-80, chore: update weights * fix: zero out proof size in weights * chore: resolve --------- Co-authored-by: dnjscksdn98 <[email protected]> * fix: correctly use mocha with tsx (#133) --------- Co-authored-by: dnjscksdn98 <[email protected]>
* Node 161 pectra update (#126) * NODE-161, deps: update to stable2503 * NODE-161, fix: node: Replace TxPool RPC with Frontier implementation #moonbeam-foundation/moonbeam#3218 * NODE-161, fix: runtime: Fix weight limits in evm tracing runtimes (moonbeam-foundation/moonbeam#3210) * NODE-161, deps: update Cargo * NODE-161, fix: Use DecodeWithMemTracking (paritytech/polkadot-sdk#7360) * NODE-161, feat: runtime: upgrade to EIP-7702 new APIs * NODE-161, Introduce a gas-based Storage limit per tx (polkadot-evm/frontier#1142), Support external account provider (polkadot-evm/frontier#1329) * NODE-161, fix: remove sc_transaction_pool * NODE-161, fix: add missing crates * NODE-161, fix: resolve typo * NODE-161, fix: remove Paramter * NODE-161, feat: Allow whitleisting contract deployer (polkadot-evm/frontier#1629) * NODE-161, feat: Update Treasury to Support Relay Chain Block Number Provider (paritytech/polkadot-sdk#3970) * NODE-161, feat: [Identity] Decouple usernames from identities (paritytech/polkadot-sdk#5554) * NODE-161, feat: Collective: dynamic deposit based on number of proposals (paritytech/polkadot-sdk#3151) * NODE-161, fix: add missing DecodeWithMemTracking * NODE-161, feat: Moves disabling logic into pallet-session (paritytech/polkadot-sdk#7581) * NODE-161, feat: Update Scheduler to have a configurable block provider (paritytech/polkadot-sdk#7441) * NODE-161, chore: add WeightInfo to pallet_transaction_payment * NODE-161, fix: add missing authorization_list * NODE-161, fix: replace to new_bare * NODE-161, fix: add missing DecodeWithMemTracking derive * NODE-161, fix: resolve type mismatch * NODE-161, fix: use system_version (paritytech/polkadot-sdk#4257) * NODE-161, fix: use Cow (paritytech/polkadot-sdk#5693) * NODE-161, feat: Generic slashing side-effects (paritytech/polkadot-sdk#5623) * NODE-161, feat: impl create_inherent (paritytech/polkadot-sdk#3685) * NODE-161, fix: remove generic parameter from on_unbalanceds * NODE-161, fix: update storage_at runtime api * NODE-161, fix: node: Remove network starter that is no longer needed (paritytech/polkadot-sdk#6400) * NODE-161, fix: node: update FullNetworkConfiguration params * NODE-161, fix: node: update TransactionPool * NODE-161, fix: node: substrate-offchain: upgrade hyper to v1 (paritytech/polkadot-sdk#5919) * NODE-161, fix: node: update service, rpc * NODE-161, chore: remove unused imports * chore: add cargo feature "metadata-hash" * NODE-161, fix: add cumulus primitives storage proof size HostFunctions * NODE-161, chore: update dependencies branch * NODE-161, chore: update to stable2506 * NODE-161, chore: remove `RuntimeEvent` from pallet::Config * NODE-161, fix: update test code * NODE-161, fix: make node-lts compatible * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, chore: update `test_btc_registration_pool.ts` * NODE-161, fix: use node.kill() * NODE-161, fix: resolve test codes * NODE-161, fix: remove console.log * NODE-161, chore: update tools package.json * feat: init blaze * fix: remove unused crate * import precompile-blaze * NODE-161, chore: add mbm migrator into runtimes * NODE-161, chore: add pallet_session migration * NODE-161, fix: new_full_parts -> new_full_parts_record_import * fix: resolve issues * NODE-161, deps: update runtime version (489) --------- Co-authored-by: dnjscksdn98 <[email protected]> * NODE-80 branch restructure (#127) * NODE-179, feat: init pallet storages * NODE-179, feat: init pallet extrinsics * NODE-179, chore: add locktime * NODE-179, feat: finalize fee rate * NODE-179, feature: impl coin selections * NODE-179, feat: check blaze activation state * NODE-179, feature: impl `remove_outbound_messages` for legacy mode * NODE-80: implement benchmarking (#121) * NODE-80, feature: impl benchmarking.rs & mock.rs * NODE-80, fix: benchmark * NODE-80, fix: benchmark * NODE-80, chore: update weights * fix: zero out proof size in weights * chore: resolve --------- Co-authored-by: dnjscksdn98 <[email protected]> * fix: correctly use mocha with tsx (#133) * chore: version (#134) --------- Co-authored-by: dnjscksdn98 <[email protected]>
This reverts commit d21ddc2.
* Introduce account provider interface * Use AccountProvider logic at pallet-evm * Remove redundant ower type usage * Fix fmt * Fix clippy * Fix clippy * License at primitives/evm/src/account_provider.rs * Rename NativeSystemAccountProvider to FrameSystemAccountProvider * Formatting corrcetions at account_provider.rs --------- Co-authored-by: MOZGIII <[email protected]>
The goal of this PR is to expose account related logic that
pallet_evmrequired to control accounts existence in the network and their transactions uniqueness. By default, the pallet operates native system accounts records thatframe_systemprovides.The interface allow any custom account provider logic to be used instead of just using
frame_systemaccount provider. The accounts records should store nonce value for each account at least.Related to #1331
cc @MOZGIII