Skip to content
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

Custom transaction pool for migration process #54

Merged
merged 8 commits into from
May 3, 2024

Conversation

valentinfernandez1
Copy link
Collaborator

@valentinfernandez1 valentinfernandez1 commented Apr 25, 2024

Issue:

A known issue with the transaction pool can result in incorrectly marking a transaction as invalid if there are other transactions from the same user within the transaction pool simultaneously. This presents a significant challenge for the migration process, particularly since all calls to migrate the chain's state originate from an authorized Migrator account. Such occurrences could potentially break the migration process.

Solution:

To address this issue, a custom pool has been implemented to prevent the transaction pool from discarding invalid transactions. While effective in the short term, is not ideal on the long term and that is why this fix MUST be reverted as soon as the migration process is complete.

bkchr
bkchr previously approved these changes Apr 29, 2024
@valentinfernandez1 valentinfernandez1 merged commit 9e80bb9 into main May 3, 2024
3 checks passed
@valentinfernandez1 valentinfernandez1 deleted the migration-custom-pool branch May 3, 2024 17:30
metricaez added a commit that referenced this pull request May 6, 2024
commit 9e80bb9
Merge: afba67d 31daa30
Author: Valentin Fernandez <[email protected]>
Date:   Fri May 3 14:30:20 2024 -0300

    Merge pull request #54 from paritytech/migration-custom-pool

    Custom transaction pool for migration process

commit 31daa30
Merge: 2374830 afba67d
Author: Emiliano <[email protected]>
Date:   Fri May 3 12:49:47 2024 -0300

    Merge branch 'main' into migration-custom-pool

commit afba67d
Merge: 141f936 bb39102
Author: Gautam Dhameja <[email protected]>
Date:   Fri May 3 14:36:53 2024 +0200

    Merge pull request #55 from paritytech/feat/migration-pallet

    Add pallet migration

commit bb39102
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 29 12:49:50 2024 -0300

    cargo.lock update

commit 5f7ce6d
Merge: 48366e0 c7274ae
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 29 12:49:20 2024 -0300

    Merge branch 'main' into feat/migration-pallet

commit 48366e0
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 26 11:25:07 2024 -0300

    Remove unused config on mock

commit 13d24f2
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 26 11:00:25 2024 -0300

    Fix build and get rid of warnings

commit 4348b26
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 25 14:30:42 2024 -0300

    write pallet-migration Readme

commit 160498d
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 25 14:14:13 2024 -0300

    Remove custom pool

commit 2374830
Author: Bastian Köcher <[email protected]>
Date:   Wed Apr 17 14:22:52 2024 +0200

    Make the custom pool work

commit 3509007
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 16 16:06:47 2024 -0300

    Add missing deps

commit add62d6
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 16 15:48:08 2024 -0300

    add SpawnEssentialNamed

commit 5d34e73
Author: metricaez <[email protected]>
Date:   Tue Apr 16 15:36:15 2024 -0300

    feat: FullPool new_full signature

commit b780c87
Author: metricaez <[email protected]>
Date:   Tue Apr 16 15:16:38 2024 -0300

    feat: TransactionPool trait impl

commit fe76cf5
Author: metricaez <[email protected]>
Date:   Tue Apr 16 15:02:10 2024 -0300

    choir: generalize block

commit c9e3a43
Author: metricaez <[email protected]>
Date:   Tue Apr 16 14:57:22 2024 -0300

    feat: custom pool definition

commit 4fa0f3b
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 25 10:36:32 2024 -0300

    fmt

commit 48861f8
Merge: b192964 e85ed1b
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 25 10:34:24 2024 -0300

    Merge branch 'main' into feat/migration-pallet

commit b192964
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 25 10:31:51 2024 -0300

    Add tests for new extrinsics and ensure sender pays no fees

commit 2bb1108
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 23 14:20:45 2024 -0300

    Extrinsic docs

commit a634311
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 22 16:33:35 2024 -0300

    Make nft deposit zero and set migrator as pallet-nfts CreateOrigin

commit 893d8d8
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 22 12:03:00 2024 -0300

    add pallet-nft calls to migration-pallet and make migrator calls feeless

commit e407ef8
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 19 12:35:54 2024 -0300

    Fix mock

commit 16f6985
Merge: 065a96b 321cb2f
Author: Valentin Fernandez <[email protected]>
Date:   Wed Apr 17 13:02:09 2024 -0300

    Merge pull request #48 from paritytech/feat/migration-pallet-custom-pool

    Avoid txpool from dropping transactions

commit 321cb2f
Author: Bastian Köcher <[email protected]>
Date:   Wed Apr 17 14:22:52 2024 +0200

    Make the custom pool work

commit b7ceacf
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 16 16:06:47 2024 -0300

    Add missing deps

commit 0466dcc
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 16 15:48:08 2024 -0300

    add SpawnEssentialNamed

commit 274cead
Author: metricaez <[email protected]>
Date:   Tue Apr 16 15:36:15 2024 -0300

    feat: FullPool new_full signature

commit 08613a8
Author: metricaez <[email protected]>
Date:   Tue Apr 16 15:16:38 2024 -0300

    feat: TransactionPool trait impl

commit 38ce802
Author: metricaez <[email protected]>
Date:   Tue Apr 16 15:02:10 2024 -0300

    choir: generalize block

commit 9faa6ae
Author: metricaez <[email protected]>
Date:   Tue Apr 16 14:57:22 2024 -0300

    feat: custom pool definition

commit 065a96b
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 15 16:17:49 2024 -0300

    Use migrator account as pallet-nfts ForceOrigin

commit 62bbd21
Merge: b74235d d6415cf
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 15 11:55:32 2024 -0300

    Merge branch 'main' into feat/migration-pallet

commit b74235d
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 12 11:56:43 2024 -0300

    Remove unnecessary config from zombienet and fix migration test mock

commit 47cd459
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 12 09:55:24 2024 -0300

    Fix benchmark conflicts

commit 176b9d4
Merge: d27fc9d ab1ca78
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 12 09:42:44 2024 -0300

    Merge branch 'main' into feat/migration-pallet

commit d27fc9d
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 11 15:41:33 2024 -0300

    WeightInfo for migration extrinsics

commit 39b7c8a
Merge: 1afd5d2 a24f9d6
Author: Emiliano <[email protected]>
Date:   Thu Apr 11 10:20:01 2024 -0300

    Merge pull request #43 from paritytech/feat/migration-pallet-set-owner-test

    Feat: `set-item-owner` tests

commit a24f9d6
Author: metricaez <[email protected]>
Date:   Thu Apr 11 00:32:13 2024 -0300

    feat: set item owner tests

commit 1afd5d2
Merge: c92535c 989856d
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 9 14:33:56 2024 -0300

    Merge pull request #37 from paritytech/fix/migration-pallet-locked-fix

    Fix: clean up double code

commit c92535c
Merge: 8c82d75 750f73e
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 9 14:33:30 2024 -0300

    Merge pull request #39 from paritytech/feat/migration-pallet-benchmarks

    Feat: Migration pallet benchmarks

commit 750f73e
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 9 14:31:31 2024 -0300

    Fix benchmarking build

commit 8385b89
Author: metricaez <[email protected]>
Date:   Mon Apr 8 17:49:09 2024 -0300

    feat: define Migration benchmark on testnet runtime

commit b620c6c
Author: metricaez <[email protected]>
Date:   Mon Apr 8 16:44:18 2024 -0300

    feat: set item owner benchmark

commit f1e695a
Author: metricaez <[email protected]>
Date:   Mon Apr 8 15:04:56 2024 -0300

    feat: pot transfer check for benchmarks

commit a0f74db
Author: metricaez <[email protected]>
Date:   Mon Apr 8 13:34:23 2024 -0300

    feat: add set pot benchmark check

commit be7093d
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 8 09:50:48 2024 -0300

    fmt

commit 5031d1e
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 8 09:50:22 2024 -0300

    set_item_owner()

commit 8c82d75
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 8 09:50:48 2024 -0300

    fmt

commit 240798c
Author: Valentin Fernandez <[email protected]>
Date:   Mon Apr 8 09:50:22 2024 -0300

    set_item_owner()

commit 9a5f610
Author: metricaez <[email protected]>
Date:   Fri Apr 5 17:06:59 2024 -0300

    feat: pot related benchmarks

commit 45f1563
Author: metricaez <[email protected]>
Date:   Fri Apr 5 16:51:51 2024 -0300

    feat: create ask benchmark

commit ddf2f92
Author: metricaez <[email protected]>
Date:   Fri Apr 5 16:02:14 2024 -0300

    feat: mint nft helper logic for benchmarks

commit b19d454
Author: metricaez <[email protected]>
Date:   Fri Apr 5 15:07:05 2024 -0300

    fix: impl From(u32) for CollectionId for Benchmarks

commit 2f43ab7
Author: metricaez <[email protected]>
Date:   Fri Apr 5 12:22:03 2024 -0300

    feat: impl benchmark test suite, set next collection benchmark

commit 894b2d3
Author: metricaez <[email protected]>
Date:   Fri Apr 5 11:29:42 2024 -0300

    fix: fix bench test suite reference

commit 5e66146
Author: metricaez <[email protected]>
Date:   Fri Apr 5 11:28:24 2024 -0300

    fix: clean up doubled code

commit 5b1da24
Author: metricaez <[email protected]>
Date:   Fri Apr 5 11:25:40 2024 -0300

    feat: impl benchmark test suite

commit 989856d
Author: Valentin Fernandez <[email protected]>
Date:   Fri Apr 5 11:04:41 2024 -0300

    Remove feature from IncrementableU256

commit 658cffd
Author: metricaez <[email protected]>
Date:   Fri Apr 5 09:25:20 2024 -0300

    fix: clean up double code

commit f9cb080
Author: metricaez <[email protected]>
Date:   Thu Apr 4 15:45:08 2024 -0300

    feat: enable feature benchmark on pallet

commit b30861f
Author: Valentin Fernandez <[email protected]>
Date:   Thu Apr 4 13:09:26 2024 -0300

    Remove feature from IncrementableU256

commit 63f5aac
Author: metricaez <[email protected]>
Date:   Thu Apr 4 10:16:13 2024 -0300

    feat: force set migrator benchmark

commit 876fe19
Merge: 987a6c5 6b27a62
Author: Valentin Fernandez <[email protected]>
Date:   Wed Apr 3 20:51:31 2024 -0300

    Merge pull request #36 from paritytech/feat/migration-pallet-tests

    Feat: Pallet migration tests

commit 6b27a62
Merge: 5c6370f 987a6c5
Author: Valentin Fernandez <[email protected]>
Date:   Wed Apr 3 20:50:32 2024 -0300

    Merge branch 'feat/migration-pallet' into feat/migration-pallet-tests

commit 5c6370f
Author: metricaez <[email protected]>
Date:   Wed Apr 3 16:49:41 2024 -0300

    feat: add test for fail if ask seller is not owner of nft

commit f4e7e91
Author: metricaez <[email protected]>
Date:   Wed Apr 3 16:43:37 2024 -0300

    feat: add pot does not have enough funds test

commit 1801287
Author: metricaez <[email protected]>
Date:   Wed Apr 3 16:25:13 2024 -0300

    feat: add nft not transferable after ask check

commit 69597b3
Author: Valentin Fernandez <[email protected]>
Date:   Wed Apr 3 15:11:46 2024 -0300

    Sender not owner error

commit 8908356
Author: metricaez <[email protected]>
Date:   Wed Apr 3 12:39:27 2024 -0300

    fix: re import needed Incremental trai

commit 8e29eea
Author: metricaez <[email protected]>
Date:   Wed Apr 3 12:34:53 2024 -0300

    choir: remove unused imports

commit 7bfdd55
Author: metricaez <[email protected]>
Date:   Wed Apr 3 12:29:01 2024 -0300

    choir: delete check of migrator already set

commit 433c56c
Author: metricaez <[email protected]>
Date:   Wed Apr 3 12:21:42 2024 -0300

    feat: add set pot logic, set pot tests, send from pot tests

commit 66aad92
Author: metricaez <[email protected]>
Date:   Wed Apr 3 11:27:05 2024 -0300

    feat: create ask tests

commit 5bffde9
Author: metricaez <[email protected]>
Date:   Wed Apr 3 10:04:16 2024 -0300

    choir: delete dead code

commit c2ca64b
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 2 19:09:06 2024 -0300

    disable transfer on create_ask

commit 015faeb
Author: metricaez <[email protected]>
Date:   Wed Apr 3 09:58:40 2024 -0300

    choir: move ensure migrator to fn

commit 138561e
Author: metricaez <[email protected]>
Date:   Wed Apr 3 09:45:39 2024 -0300

    fix: refactor migrator check, add migrator test

commit 987a6c5
Merge: e912bc3 5e310cb
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 2 19:10:17 2024 -0300

    Merge branch 'feat/migration-pallet' of github.com:paritytech/project-mythical into feat/migration-pallet

commit e912bc3
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 2 19:09:06 2024 -0300

    disable transfer on create_ask

commit 1985935
Author: metricaez <[email protected]>
Date:   Tue Apr 2 15:48:46 2024 -0300

    feat: add set collection test, add getter fn for NextCollectionId

commit 170efc7
Author: metricaez <[email protected]>
Date:   Tue Apr 2 15:05:21 2024 -0300

    feat: add migrator getter, account already set check, add migrator tests

commit c9658e1
Author: metricaez <[email protected]>
Date:   Tue Apr 2 14:47:31 2024 -0300

    feat: create mock runtime

commit 5e310cb
Author: metricaez <[email protected]>
Date:   Tue Apr 2 14:39:49 2024 -0300

    choir: comment todo for check to pass

commit 96fed25
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 2 09:45:40 2024 -0300

    add todos

commit 3728d9e
Author: Valentin Fernandez <[email protected]>
Date:   Tue Apr 2 09:18:39 2024 -0300

    Pot account functionalities

commit 15a30ec
Merge: eaea8ed 287c682
Author: Valentin Fernandez <[email protected]>
Date:   Wed Mar 27 16:32:50 2024 -0300

    Add IncrementableU256

commit eaea8ed
Author: Valentin Fernandez <[email protected]>
Date:   Wed Mar 27 15:32:46 2024 -0300

    Add IncrementableU256

commit 308ac1f
Author: Valentin Fernandez <[email protected]>
Date:   Tue Mar 19 19:08:01 2024 -0300

    Create pallet-migration

commit 287c682
Author: Valentin Fernandez <[email protected]>
Date:   Tue Mar 19 19:08:01 2024 -0300

    Create pallet-migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants