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

Improve transaction handling for Parachains #1202

Closed
bkchr opened this issue Aug 28, 2023 · 50 comments · Fixed by #4639
Closed

Improve transaction handling for Parachains #1202

bkchr opened this issue Aug 28, 2023 · 50 comments · Fixed by #4639
Assignees
Labels
I5-enhancement An additional feature request.

Comments

@bkchr
Copy link
Member

bkchr commented Aug 28, 2023

The transaction pool is designed to send out events about inclusion of a transaction in a block when the transaction got included in a block that is seen as best block of the local node. If this block then for example is removed from the best chain (because we forked), a retracted event is sent. On parachains a block at the tip of the chain isn't imported as best block. Setting the best block happens asynchronously as it depends on what is the best relay chain block and which parachain block got included in this relay chain block. This means that instead of waiting ~6 seconds on the relay chain we have to wait at least 12 seconds on a Parachain.

To improve the situation we should directly send the inclusion event when the transaction appears in any block. It should not be important if the block is a best block or not. I also don't see any real benefit in sending a retracted event (we should check the new RPC spec, but I doubt that it is still send there) and we should be able to omit it.

@bkchr bkchr added the I5-enhancement An additional feature request. label Aug 28, 2023
@bkchr bkchr added this to SDK Node Aug 28, 2023
@github-project-automation github-project-automation bot moved this to backlog in SDK Node Aug 28, 2023
@bkchr
Copy link
Member Author

bkchr commented Aug 31, 2023

This change is also important to have ready_at return directly when we build a new block. Currently we don't start the maintenance as we don't have seen the block import yet. A consequence of running maintenance for every block could be that we invalidate transactions on one fork, but they are not yet included in another fork. I don't think that the transaction pool currently supports "fork handling". We should look into this when working on this feature.

@rphmeier
Copy link
Contributor

rphmeier commented Sep 4, 2023

It's also worth noting that collators will build forks deliberately, if there are relay chain forks.

And now, with asynchronous backing, may build on top of blocks which themselves aren't the best (and sometimes multiple blocks immediately in a row).

I'm not really familiar with the details of the transaction pool but it sounds like the solution here should work for those requirements as well.

@michalkucharczyk
Copy link
Contributor

(we should check the new RPC spec, but I doubt that it is still send there)

Forgive dumb question, where is new spec? Is it here and here?

@bkchr
Copy link
Member Author

bkchr commented Sep 11, 2023

Yes this is the new spec. I already opened a proper issue here: paritytech/json-rpc-interface-spec#87

@bkchr
Copy link
Member Author

bkchr commented Nov 9, 2023

While looking into async backing we have seen that the transaction pool is sometimes rejecting transactions when building a fork. Let's assume you build block X that includes two transactions from account A. After having build the block and removing the transactions of block X from the tx pool, we start building block X' (a fork of X). Account A still has some transactions in the tx pool, but their nonce doesn't match the chain state of Y (parent of X and X') as the tx pool thinks that we already included the transactions. While the tx pool is right that we already have included them in a block, we actually have done this in a fork and thus the assumption isn't correct and will lead to apply_extrinsic returning Error::Future (because the nonce is too high).

To solve this issue we need to make the transaction pool fork aware. This means that if we are building X or X', we both times use the transaction that are valid in the view of Y.

@bernardoaraujor
Copy link
Contributor

some extra info on this:

we are working on a parachain project that will need to use the available blockspace as efficiently as possible

since async-backing was made available, we have been doing extensive testing to have empirical numbers of throughput for different kinds of extrinsics

we have been using evm-tps to spam the parachain with extrinsics.
despite the fact that this tool's name suggests our scope is limited to EVM, it also allows for spamming of non-EVM/pure-Substrate extrinsics.

the parachain codebase is using polkadot-sdk v1.2.0.

when we spam the parachain with multiple transferKeepAlive extrinsics (pallet-balances), the transaction pool eventually drops all transactions.

here's how we've been monitoring the pool while we spam (it checks author_pendingExtrinsics every 1s):

$ while true; do curl -sS -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_pendingExtrinsics"}' http://localhost:9933 | jq -r '.result | length'; sleep 1; done

and this is what we see:

3827
3827
3827
3827
0         # there's no block with 3827 xts
0
0
0
0
0

@bkchr
Copy link
Member Author

bkchr commented Nov 9, 2023

@bernardoaraujor please run with -ltxpool=trace and check why the transactions are removed.

@bernardoaraujor
Copy link
Contributor

bernardoaraujor commented Nov 9, 2023

up until this point, everything seems normal:

2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] [0x505bff87d0eea59aef4e89a67b47402950c938212824192e581239d8a04aa178] Importing to ready
2023-11-09 17:22:18.014 TRACE tokio-runtime-worker txpool: [Parachain] [0x2d5bd826541a855f48dd2e40ab0860236c99ecc73f49341eb32287e4e30534a0] WaitingTransaction { imported_at: Instant { tv_sec: 19636, tv_nsec: 211760166 }, transaction: Transaction { hash: 0x2d5bd826541a855f48dd2e40ab0860236c99ecc73f49341eb32287e4e30534a0, priority: 1459, valid_till: 42, bytes: 116, propagate: true, source: TransactionSource::External, requires: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac8d010000], provides: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac8e010000], data: 84fe0ffff4f3e12fb08bac1f573b37d8f4a33734aca89955beb362b214c6b0633c76514a830e5d4a6040e2a70a5d98e90f531e9b19610c7abe3e2ab3995886350042e2a357a13dc746d1812ee1142c8d0225eaaad101b4003906000a038d17e4815b18abb0ff1e3af016bc3f82c9102e1804}, missing_tags: {}}
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] [0x2d5bd826541a855f48dd2e40ab0860236c99ecc73f49341eb32287e4e30534a0] Importing to ready
2023-11-09 17:22:18.014 TRACE tokio-runtime-worker txpool: [Parachain] [0x4823539cdd4a7f4e37ef6e0b2d0333bfe23b2c380cfa41b50b81451c91ccadf1] WaitingTransaction { imported_at: Instant { tv_sec: 19636, tv_nsec: 211781125 }, transaction: Transaction { hash: 0x4823539cdd4a7f4e37ef6e0b2d0333bfe23b2c380cfa41b50b81451c91ccadf1, priority: 1459, valid_till: 42, bytes: 116, propagate: true, source: TransactionSource::External, requires: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac8e010000], provides: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac8f010000], data: 84fe0ffff4f3e12fb08bac1f573b37d8f4a33734acf8c300220a1e272dc4804b4562542ebb55023aecf0454ef98445d7c5ab9f43ec71486b17289018fbb286e994e451ce5e1555cc00151306ed9e38c3eccb60895501b4003d06000a038d17e4815b18abb0ff1e3af016bc3f82c9102e1804}, missing_tags: {}}
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] [0x4823539cdd4a7f4e37ef6e0b2d0333bfe23b2c380cfa41b50b81451c91ccadf1] Importing to ready
2023-11-09 17:22:18.014 TRACE tokio-runtime-worker txpool: [Parachain] [0xc913886ee07600e46ae886ae9fb1245f84c7279ddcfb7bf14e8bc675986b1f37] WaitingTransaction { imported_at: Instant { tv_sec: 19636, tv_nsec: 211795666 }, transaction: Transaction { hash: 0xc913886ee07600e46ae886ae9fb1245f84c7279ddcfb7bf14e8bc675986b1f37, priority: 1459, valid_till: 42, bytes: 116, propagate: true, source: TransactionSource::External, requires: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac8f010000], provides: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac90010000], data: 84fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac8e0998798c574f2d807ce59b1d3d9f1f3c0d02248c0896bc196b66c7456d65793b8817ca50ec886bcf8298b6f2246bdd74fea9242f14e6a0fab63c3000113cb501b4004106000a038d17e4815b18abb0ff1e3af016bc3f82c9102e1804}, missing_tags: {}}
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] [0xc913886ee07600e46ae886ae9fb1245f84c7279ddcfb7bf14e8bc675986b1f37] Importing to ready
2023-11-09 17:22:18.014 TRACE tokio-runtime-worker txpool: [Parachain] [0x67d948c5cbcb4fcb3804fbc6c256a89215f4796f9f8f319dd372ba0986cf6351] WaitingTransaction { imported_at: Instant { tv_sec: 19636, tv_nsec: 211807125 }, transaction: Transaction { hash: 0x67d948c5cbcb4fcb3804fbc6c256a89215f4796f9f8f319dd372ba0986cf6351, priority: 1459, valid_till: 42, bytes: 116, propagate: true, source: TransactionSource::External, requires: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac90010000], provides: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac91010000], data: 84fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac712c8ea67d33439c8c83f5531a8eab15599f97d552f6ecb785146cea0fb713ab1d10eda32d14187fbdaaf49d4f1cdcb265cd5e9060b7751a66f5b5375c0f506400b4004506000a038d17e4815b18abb0ff1e3af016bc3f82c9102e1804}, missing_tags: {}}
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] [0x67d948c5cbcb4fcb3804fbc6c256a89215f4796f9f8f319dd372ba0986cf6351] Importing to ready
2023-11-09 17:22:18.014 TRACE tokio-runtime-worker txpool: [Parachain] [0xa62e2aacaf621cfc7cefd56c711778ad8c5cd93694e86c4c5453133ff21e82cb] WaitingTransaction { imported_at: Instant { tv_sec: 19636, tv_nsec: 211818666 }, transaction: Transaction { hash: 0xa62e2aacaf621cfc7cefd56c711778ad8c5cd93694e86c4c5453133ff21e82cb, priority: 1459, valid_till: 42, bytes: 116, propagate: true, source: TransactionSource::External, requires: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac91010000], provides: [fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac92010000], data: 84fe0ffff4f3e12fb08bac1f573b37d8f4a33734ac88c3d94ab9031879fc15290f1e8005f27d290d181d670daaa1e8190266b3589d7f837b453ccc75268ce0ec47454548a03124fe374db5b18e4914569d35529db000b4004906000a038d17e4815b18abb0ff1e3af016bc3f82c9102e1804}, missing_tags: {}}
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] [0xa62e2aacaf621cfc7cefd56c711778ad8c5cd93694e86c4c5453133ff21e82cb] Importing to ready
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] Resubmitted. Took 22 ms. Status: PoolStatus { ready: 7953, ready_bytes: 922548, future: 0, future_bytes: 0 }
2023-11-09 17:22:18.014 DEBUG tokio-runtime-worker txpool: [Parachain] Revalidated 20 transactions. Left in the queue for revalidation: 20.

then:

2023-11-09 17:22:18.016  INFO tokio-runtime-worker babe: [Relaychain] 👶 New epoch 2 launching at block 0x33c3…9f11 (block slot 283260223 >= start slot 283260223).
2023-11-09 17:22:18.016  INFO tokio-runtime-worker babe: [Relaychain] 👶 Next epoch starts at slot 283260238
2023-11-09 17:22:18.020 DEBUG tokio-runtime-worker txpool: [Relaychain] resolve hash: 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11 finalized: false tree_route: (common HashAndNumber { number: 30, hash: 0x07569ee49344becd3dac36a5b18d46eab6f1ad0896239b913ee581aa488c7e8c }, last Some(HashAndNumber { number: 31, hash: 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11 })) best_block: 0x07569ee49344becd3dac36a5b18d46eab6f1ad0896239b913ee581aa488c7e8c finalized_block:0x3d7374f3f6fb1fc2b3593b1b7e2bb4754dc6be11649b93cb2ccb0379f70ae284
2023-11-09 17:22:18.020 TRACE tokio-runtime-worker txpool: [Relaychain] handle_enactment tree_route: TreeRoute { route: [HashAndNumber { number: 30, hash: 0x07569ee49344becd3dac36a5b18d46eab6f1ad0896239b913ee581aa488c7e8c }, HashAndNumber { number: 31, hash: 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11 }], pivot: 0 }
2023-11-09 17:22:18.020 TRACE tokio-runtime-worker txpool: [Relaychain] Pruning transactions: [0xe4aa473edf1d86aace4f7637b6c3f016a120c866fbcdac8f5296eb4a8b195bf5, 0x899e2eaabfbb2a27aa09004df564ab4d514fb4c36562a883edf28063ccb07017]
2023-11-09 17:22:18.020 DEBUG tokio-runtime-worker txpool: [Relaychain] Starting pruning of block 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11 (extrinsics: 2)   
2023-11-09 17:22:18.020 TRACE tokio-runtime-worker txpool: [Relaychain] txpool is empty, skipping validation for block 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11
2023-11-09 17:22:18.020 TRACE tokio-runtime-worker txpool: [Relaychain] txpool is empty, skipping validation for block 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11
2023-11-09 17:22:18.020 DEBUG tokio-runtime-worker txpool: [Relaychain] Pruning at 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11
2023-11-09 17:22:18.020 TRACE tokio-runtime-worker txpool: [Relaychain] Pruning at 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11. Resubmitting transactions.
2023-11-09 17:22:18.020 DEBUG tokio-runtime-worker txpool: [Relaychain] [0xe4aa473edf1d86aace4f7637b6c3f016a120c866fbcdac8f5296eb4a8b195bf5] Pruned at 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11
2023-11-09 17:22:18.020 DEBUG tokio-runtime-worker txpool: [Relaychain] [0x899e2eaabfbb2a27aa09004df564ab4d514fb4c36562a883edf28063ccb07017] Pruned at 0x33c31f244a7641ff2f82cbeefbf07d7ec169640e05640e2c462b1d78776f9f11
2023-11-09 17:22:18.020  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #31 (0x33c3…9f11)
2023-11-09 17:22:18.025  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] 🙌 Starting consensus session on top of parent 0xe8cea3d760252f9c73f884648c0f6cefda3f847d99eafa7e2b6ede41fee0b135
2023-11-09 17:22:18.026  INFO tokio-runtime-worker skunert: [Parachain] post_dispatch: Unspent weight: ref_time: 0, proof_size: 0
2023-11-09 17:22:18.026  INFO tokio-runtime-worker skunert: [Parachain] post_dispatch: Unspent weight: ref_time: 0, proof_size: 0
2023-11-09 17:22:18.026 TRACE tokio-runtime-worker txpool: [Parachain] Transaction pool already processed block  #14
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0x22c4f534b725af6e885835b78023f157f0178388dda9a3c4bd993aa1550b0768] Reported as invalid. Will skip sub-chains while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0xe1d87232be31c96fa0552d46bb62c916ae9134b13e2a6b8a7e9aa49747af9263] Reported as invalid. Will skip sub-chains while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0x4ebf5b545735313724848fd281ecf7210862d0c73c037da29de977886e3e6fc0] Reported as invalid. Will skip sub-chains while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0x7b195df33a155982f2f2b024b797ecf75d7086e60b635ef18087042db0d275d3] Reported as invalid. Will skip sub-chains while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0xd60a310b314cf0ca0951cbfc042029b2244ed827575a368510f4662e2526aee0] Skipping invalid child transaction while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0x15f4416c8b1e16e4c3f85967defa1af06e77d035bf53b17498749e280a440b49] Reported as invalid. Will skip sub-chains while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0xf1be885b3a50e5fcc2c22c1f0d3eeca47ed504574894dc769165ce6c7381b4b5] Reported as invalid. Will skip sub-chains while iterating.
2023-11-09 17:22:18.027 DEBUG tokio-runtime-worker txpool: [Parachain] [0x1c522b9a8d5cd3960fdb1516aa0c2b0581aa512a62c0c53df7ff766118d742ef] Skipping invalid child transaction while iterating.
2023-11-09 17:22:18.028 DEBUG tokio-runtime-worker txpool: [Parachain] [0xc450054353e47874270d9741566e59b85e1952cde12cdb6c6d3b14001f13da39] Reported as invalid. Will skip sub-chains while iterating.
...
2023-11-09 17:22:18.039 DEBUG tokio-runtime-worker txpool: [Parachain] Removing invalid transactions: [0x22c4f534b725af6e885835b78023f157f0178388dda9a3c4bd993aa1550b0768, 0xe1d87232be31c96fa0552d46bb62c916ae9134b13e2a6b8a7e9aa49747af9263, 0x4ebf5b545735313724848fd281ecf7210862d0c73c037da29de977886e3e6fc0, 0x7b195df33a155982f2f2b024b797ecf75d7086e60b635ef18087042db0d275d3, 0x15f4416c8b1e16e4c3f85967defa1af06e77d035bf53b17498749e280a440b49, 0xf1be885b3a50e5fcc2c22c1f0d3eeca47ed504574894dc769165ce6c7381b4b5, 0xc450054353e47874270d9741566e59b85e1952cde12cdb6c6d3b14001f13da39, 0xa3d1bcf17cf6b3f27ac523cd93c16eb4dfdce85f4b5e5dbe71102001bda5f8d0, 0xf9c9b17268dafb6870e0e73e8cd40b6257655ca3a72898e6e0aebad560fcb22f, 0x64f7dfad602cdb1d47adf72cf5206fa2c267b763ad4a1fa60042df5f03c1b29e, 0xbca3364c1a49f485570987d8aa99de837b7c8fa838a638e2ea2161345c9f5368, 0x1e4a58031044a71b2b18f0c7152b4ad7b2fe893b9add7c1bfb926a9ff4fafaf6, 0x2541716b5a2d8c5e89d362604e8606d664e919f0ee6d24add6ddbd4612c2b5d9, 0xb0407b9456a08fa52ee6a17474da2266e3e7019dcc85060d4eac74bf0aeb6258, 0xcd168f56b8617c3190b490372d8c9664e368472f142e0de50136d0e8d4d733b7, 0xabe6164790ca49d33b420486631c4f54969ba63b8180f4303a5528ac91adf5ee, 0x632e984d31d43291a5de279c96740bd3732e1003bb9f4488ef92fe6936b1ddca, 0x99529ffcc85a4029f2c154079f322c579a713b6bc764b203340b04ced876f8d9, 0x1cb03d1d470afc9da072c9a0c87a57e85e54f52c1586c0a9238504ca04607b92, 0x869e88f4d2cebba7e30446fe410c9dcddcf02c900a1f5bc1d2e698cd02510926, 0xe283fd984334c6363508570f30961d341bdbc57b9a16ca3f185de6569c1d722a, 0x8684235d918d5feccb9060c23c6cbedbf2b48cce4da09424f7eccefbec47d00e, 0x3aadd6b296bc4dfc94935923b3e4b582fd058b35cd0d522698f24f5cfca816bc, 0xc901cd3485f54adb0022390e1fc2334c0736418c883ed63f95b0b2c49d745ca0, 0x8f79d75fd4f6806425e56c24479309ac2075cc2963fbcca8560d20ac4320a537, 0x7444645b549aa6e5fcd7889707fef3fc5d2a23c12f1b98e65c9c21d51b0740e6, 0x4e552548f7978313125b15619225d7040373f405704906dd397b38547cdd78e5, 0x1d6586c9b420adee2ae7ff423d60a34596c575b7e1188f3ba6c0f7e1f711e284, 0xf10833bb0270c029b2cc6676cdc805ee6f37988f745d255af618ccbae3ed5fd5, 0x0c90cf00236fb970e877fb05eed7a2c366a6d31d06c2208b740e65f8b8f229ee, 0xe036ac63ef29b56a38ec3be0ad6c0a57d6600130178cc4c5a723f0f89dfd1b54, 0x2b5cb4a35b0afdf10f4015364dc32db64429c70b67001deb685f611bb307b3d5, 0x9f40e1db88fb5f890a26c5fb57117f653003ff225a9fad9c3fc97d5c3ba72b0f, 0x9795b2311e1966d703a14025f977f9642a7b03e92b7e4b04c3c5daf66f6113f9, 0x9b31b037162b4386347e78ee91c7a710106e136c8dab5f9ddbe4f31d8c868c71, 0x2200b56c2f8fb9cde54009a82e437e8efa684eef26e11a57db2e538fba617864, 0x45b25653eb359ce63d19e6afcbf7d4deb9896367ad87e9050195db807c891cef, 0x35691f5dbe3656c4ce9160283c33461e1fe2af16bf38d295275cc8533ebfa797, 0x51d08524ae55afa476733321465a211cfb796a158562f5ddaade79c4feb3514a, 0x8633a55a07727f5a51c011eda7c7a8b9e38c7ccb44f00361cb15ec97f3948a4e, 0x663b4cb4325303d8512694a2f3c79565c1b6e51b38f9b540f7cd53136a0824be, 0x24245823aae09ba0fa017d1b02c526a766c767c3f44d3bc25eb145ae9d103734, 0x05b9854e7e44c48e2ec76a8a2500e73a4e19c4dbdc5b4162029640b4cdf80903, 0x1a92e4d9c164305622c64949163151ed587e6420808500f4278561413041444c, 0x23b0054df204dd4f81f0aeef6dad7d26e24305e75dd5bb2ac96877f268027aff, 0x3a238b7b426197d26e3279070f85cabe60aee101190a85bfe38dc7ea0ef5c473, 0xa982566c5743b877364195226882b05c0ca2b8d8ee78bb2f03a101c16d8d41bc, 0x61549d593adc54b6e0b26a697bd24af4d5a3d74405ebd245ed23b35ff5a0f889, 0xc5a528279e84f50a30b8c4c6c28ee990a0f1374bfea4ac0604042207a79ab92a, 0x3e1166b95258541c64bff0ab2dcd883218688904216bc857a2b04e946c88913e, 0xf4a9ea5c0d4c0f05910eb549324866111dc41c501c17a42bef1de43c995783a8, 0x092556a14ba2914fdb00111031f25a398b02fa5cd490804bf0ef4171f920ac3b, 0xd5054037bf7e5d9b6ae301d8c8ba8f8cf94c987cd8a97cb4cc1f7b99a32ad832, 0x107f623e3e0705b045565ae68856d2e391a114db1887b576231c765f12d0ca10, 0x6cec6359759c5d915e2e2c0a5c7e4e46e6c4212ae5d8b752366f22353a2e3002, 0x6903fe51b94c9963a0ee74c5d356a1eccb2d5934436f6854c48516ddf8a399f1, 0x8ada451406fb3da6a41e7a11b7b17bd5166aebb5a967768561921dd684528480, 0xc661133ebe4b12d52d4b40a0185894d8ebbb174e7a4bf7c781146d4050957af6, 0xb4e8a5460a2dd8b5a5da60ef2113bf2e4a6e81d651a7447405f232e082420432, 0x587be78f66931f2be7a1c420c7693751334f2c89c64eaa298aba91fabb6e988b, 0x4cfec8b41995aa89b4b3b11f318213db386c72132ebccf82d4828b27fec8755d, 0xc59afd59942a5f677273123c8fdc13c2bbc4970832f0368be9ffff947bd28a2f, 0x4be809cababa18e4891ae3ec07ba31ca3024208cb740aa3502dc705a505e1a6f, 0x55fae4f3f44d8da8ab954f00e70fe0f0d053400e7db1242a7da45e787b13c764, 0xfa5ea3f2aad46d89069c494bb001c35f5731b726a4bf83e21cd721dbd1cd870d, 0x2341b54ab1eddeaa9ec2523eacd86c7ede83d77870e7ac93e2da56a4c7e64f6f, 0xb5ed10a313f8af3d7baa873294d7e90f474f7056fc18e975e8f89a5a311d5c5c, 0xe1088cd80f6b91d39a75f4c2b7fb7d49a965ebfbf1be5c60963e73b015661f07, 0x666fec58de1bd79f03cd4d3732e8791cb9b242fcafc70d50fc72fe556e380b3f, 0xd7f225f61bb70ed3652417476682b3454fe94736cbabd1f16723673aea933e1b, 0x013ab17df68c547d583275a682b3edcac23cb5c5bca9a5cb077db85969fd55df, 0x2e35ecb8aa80bd688c3662368efe7ae7d4bfbe257014409e11e17590ba142842, 0x55e23dcd7608f75eec53b62542d1964bc579ae14dcea775fa43e9dc694ee0bd4, 0x6de06da5aa82ce506507247eff83e32d177174e9dcb8cf807caa15c0ee351f39, 0x5e4739658c3d102d2585c46a4a779924a9a60cc353c3d21be6f4c4f437f7cbb6, 0x59d8bb4d8725eaf578528bc07c68d6f63d7af57d82068932a8b98dc1dfdd01e7, 0x560a3c696726497f0ba5722f9fa20801946e9894d23c70d766afc36db3ae9e90, 0x7f056c8c4fc5ad2b60a0f0392cd15979001ae95d8d2b47e1164bcc2f66f8ed99, 0xb86993dbeb40c970a3df320899e2ac3b5b07021ed4930b48af375bbc7fb15d3f, 0x4412ff0edbef7790a8d0a63a0c7e7cf2bffd18d0407d5c5bb0340ceccf3121f1, 0x0415749c49cea625d794be70f6f652ca0019774c004f85863086868d8fa39d0b, 0xdbf7b5e48488864b6c3c2fd64bffb68a26dc775e6cbe604de2ff589b69b8e568, 0x3d24d20a8d37ae6266b2cd6eb6e1c14f78f3da471dfd856412155a90b780269c, 0x40d9bb6c7bb2a47fbb0ebeff95e1302e721b160881ad1e73da30ecc7564652a5, 0x2efe1728c94389fcc81ac0d114baf0d68dc397a35835e28704ef6ca2fb05e9b8, 0x8e5dd47cb9378b7ea0bc59e2d60011ad656532218966b0cc474ea9ac73d3d443, 0xce3aec9a413bbb866f709a0a2e00227e47a7d5d722b34a0cb8736d0a1cd0e272, 0x99c3179331a99c4397a83bd1433dfdd2acd64140e69ee2bf372c5c2e2c7dc581, 0x85112bc9f51a06919bc5132b963b8c4f46e11c59bc0e51e511fb1f7b8c38a5e6, 0x935a66b3673706a72dc877eede5a242e9aff41f3e4b425656dab3e7314da7707, 0xf0020dcc3b5a516a7a6db0410fb6713e4ba6927e76cb1cf4183864d1642e5267, 0xc7856e0dde728a412a1c497fb3f35afd2366e5ec9ce54006f1e4b048476d6be8, 0x7907d86c2fc1d3b5ebcadbeed1f60fa0d0d946cf41bbec53d8d7dfd769abef36, 0x1c7a0f4622e4535383cb99ec8a12760e97731c05b094530fbba71ebf068fede2, 0xcf1078392f907090e823cc2662117233ed685aceb91d77ba9d725a4c3546b357, 0x9dfb8cfb6b90d6adb54c5f9f1932ced8444abb91c63c28a5b01392e9c68fe742, 0xdb987afea8f810c2903eb13f6bc007a05a462753a13fae166d4dcdc5c83cc96d, 0xed9366dfd4aef82ee1515a20cc49860b06454d14caf0c5c5b46476a58679601b, 0xd7708399189922d05da3f669317a10d0e74191e3c05aeae92bbf45a60c486da5, 0x37195b0d66abf1afe635283776c5539638174c5db2b02dc032cde07a193c00b4]
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x37195b0d66abf1afe635283776c5539638174c5db2b02dc032cde07a193c00b4] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x064e4445eaa0b41a4b558631635bb333cfe75dd8448cfad430fa49fbdc6ac22e] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xb589fd9e4aac2f29a780143abb332b7dfdfb65cc7562560cbd132cd47989f291] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x259651a767b746c75a9463e3b61521775e5bd7f9d91c87236ef8251e88fbe034] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x1ce94f2dda858eccff4a096facf155f1517aeaab702969ec0f8b47ed2bc75a36] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x03ae9287f819a3b7b7a2b1d0e3c3d24a525d75ccf4e521d293bc6cf7835808ee] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x5bb2b014407d60458fefcc3fad705230d6bb438e7299876f799be6fa88d688ee] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xee06f8a85e4b44543cedd50b2fc36d619dc74345b9e3b2c1bee6243d98263850] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xcd575fc69bfa9b39787948ca92cd7c71a2f0129ad2f4a4e938bf1cfcc0c1f9fe] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xa2df34ce378e2ffd82a2ac527f9a75bc78243d1e3e034c2913c614bb2cdc6adc] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xa1edf60850286faa49a207a8bd0a9c21860320e073f445b970e04abcd1ff98da] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xb71838528ef676d2318fe092c6a3087255dbe40c85b4f45a6621c06abfcf9fe0] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0xab2dd34f6c0a3f4061dac8c0e96901ceb9d446eedbf3aa53e3c15537b3615c14] Removed as part of the subtree.
2023-11-09 17:22:18.039 TRACE tokio-runtime-worker txpool: [Parachain] [0x0d6b88c27b7bf6ccabbfb8434835f5775eec2dc24ed460f6d10d9c352e5052b3] Removed as part of the subtree.
...
2023-11-09 17:22:18.054 DEBUG tokio-runtime-worker txpool: [Parachain] Removed invalid transactions: [Transaction { hash: 0x37195b0d66abf1afe635283776c5539638174c5db2b02dc032cde07a193c00b4, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c60010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92cfd81871d11a8e1eccc4452bdff9a96593b13237194a6274d4f117c4c45f918fd6204ebc1a8259f2ee197f1f43bcc3a026a654f76f69a8bf71bc4ccf6496e0b7a00a4008105000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x064e4445eaa0b41a4b558631635bb333cfe75dd8448cfad430fa49fbdc6ac22e, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c60010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c61010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c5d3bf369b9c7d111dd13c42f86ade0ceab5337203d9b7028a163a8c0259096bd6c385d98b6a9a346cffb1f2021daecb794916c78b3ca137caa597edac51027f901a4008505000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xb589fd9e4aac2f29a780143abb332b7dfdfb65cc7562560cbd132cd47989f291, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c61010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c62010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92cbd8ef0be14ef74eeff12ea408f6aa60141bea59c59f242caf54c83b518aa573b714eab7965acfcbc47d658817d998c61cc6e6bb50fd036aee57beebe9630a9e001a4008905000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x259651a767b746c75a9463e3b61521775e5bd7f9d91c87236ef8251e88fbe034, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c62010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c63010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92ca8789f959db5ac385a2784a7130119b83277823e10ce43851cc9b9ce6e6ba6a66c768606e88e18040220f689c0f3d7ad4a47fc1f7ec9627fe40c34ddf29bc15c01a4008d05000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x1ce94f2dda858eccff4a096facf155f1517aeaab702969ec0f8b47ed2bc75a36, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c63010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c64010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92cdadeadb24a45bb0c6f759758f45e1cacb95caac8dcc4729ab04148e8ff9da9f05edc89e8e1ad94d0307c8bf89cc8c1d0572815dfb4dc2f7ac130064eee153d2f01a4009105000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x03ae9287f819a3b7b7a2b1d0e3c3d24a525d75ccf4e521d293bc6cf7835808ee, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c64010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c65010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c6c95853487337b499b42681ebe2debc9b3297d2f14c9377d94cf61b93ed44aec2493d3777a27514ac424e484b0b6da7f93f7703c370b590098cd0e52977caf8400a4009505000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x5bb2b014407d60458fefcc3fad705230d6bb438e7299876f799be6fa88d688ee, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c65010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c66010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c82b3c83d287029d77103481dcb271cfc499ca378112174e5407dd30569bd5b182eb7aebedd8c785647e28e5bbdf260d3bfbfd522154c6bd3ac17155755dac74b00a4009905000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xee06f8a85e4b44543cedd50b2fc36d619dc74345b9e3b2c1bee6243d98263850, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c66010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c67010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c063a5e629b13cfe5e74c8ed5279b1583db9de9701bd99af67d92243d0585ea2c14beb06633b4ae654d6c623ffc952fc02c0f5bb152ecd70749b73737d957942b01a4009d05000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xcd575fc69bfa9b39787948ca92cd7c71a2f0129ad2f4a4e938bf1cfcc0c1f9fe, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c67010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c68010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c1537670c448e56c09abaf4eb2b2a76b1517338ea698dad2143c73a8cf404a1ea76cfd93e6484fe928d8b55b0ff7573834e5bfaf92014227b7a00bf1cf635452201a400a105000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xa2df34ce378e2ffd82a2ac527f9a75bc78243d1e3e034c2913c614bb2cdc6adc, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c68010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c69010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c8e63a35b9d5b15309b4020e50cda15a77c9d5a781ee7c29f6da6f6c3635ff91553cab79e50e54e5463b9f9e6e07f74988a9fd1ad06180d0ca354ec32ee399d5400a400a505000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xa1edf60850286faa49a207a8bd0a9c21860320e073f445b970e04abcd1ff98da, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c69010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c6a010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c17fa23e4c12d474334d3895fb3edc0ae3dd761d60a04674108dbde58d54e0b8875a98afa3ce4b1f59ab0afda241ed1b05b31b2f5207aae6f5302724d672707c501a400a905000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xb71838528ef676d2318fe092c6a3087255dbe40c85b4f45a6621c06abfcf9fe0, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c6a010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c6b010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c39fb9303f9c69e47ae430348c498ed31e77d553e586c11ead47f825757aa51b13029e82f3bf3786446275ac1f599076b388e81a1d957837b98b94368b935f2de00a400ad05000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xab2dd34f6c0a3f4061dac8c0e96901ceb9d446eedbf3aa53e3c15537b3615c14, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c6b010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c6c010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92cf1ebfba4c9a6cdd25aa7b483ce608742d061848d49a4e945f495ac6a5cd966c3159ab399097d6ca9debed4810e2a375ccc314294e5a5cb0d7b45502a581f290d00a400b105000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x0d6b88c27b7bf6ccabbfb8434835f5775eec2dc24ed460f6d10d9c352e5052b3, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c6c010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c6d010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c0230d6b8a4077d7ef37b19875b83bdc50e3308e066e395102a49e3b377fbf1d12cd3a775137d73599d3ca1017406a31ac301041c0b150070231cebc67be7c1bf01a400b505000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x2c052046aaa2406dfe8078df29825175bd71ebc51f0639f8632f26a6bb741f82, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c6d010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c6e010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c3c288947b9a1d6ce56b041c110f0caa0a6f50cf6679a086519c12073570f669f02e979905f043418057e519284a3778362deadc78be9c1d33f58300fb9b84bc601a400b905000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xb47a79b6da79274b3aa70ff39960e28eb6910f21cda03b46adbce860723cca8e, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c6e010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c6f010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92ce69512874ffcf4abb6250a03f3a7d1c36e6cda59d6f82fecf917c7c4e1564399374ad2bfffa8f3921854f7b3a914fdc1b020005c26d3e283aa1a98b53eea2ec501a400bd05000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0xf32d45f412391f34849bf25a18e64e81b8d97ab1a8e75b77eb6997f821d4f5b7, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: TransactionSource::External, requires: [7a4a1533423e7f169e752cc51346f35195cbd92c6f010000], provides: [7a4a1533423e7f169e752cc51346f35195cbd92c70010000], data: 847a4a1533423e7f169e752cc51346f35195cbd92c3207a2793d58b441fca178d55b895f06cdbb06f1dafafb3a5037742110831554014f8f372e33e8448467b6c4205918bb80fb7e59c3e3701fde4cd682774b9f8501a400c105000a03537f17fb7fa5acbc6dec8b2fd1d64bbb6031d6d404}, Transaction { hash: 0x8cbf589cb6aa40e5e025ead12ce72e56f8b4a87d86119f42ccd410da7954b699, priority: 1459, valid_till: 41, bytes: 116, propagate: true, source: Trans...
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x37195b0d66abf1afe635283776c5539638174c5db2b02dc032cde07a193c00b4] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x064e4445eaa0b41a4b558631635bb333cfe75dd8448cfad430fa49fbdc6ac22e] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xb589fd9e4aac2f29a780143abb332b7dfdfb65cc7562560cbd132cd47989f291] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x259651a767b746c75a9463e3b61521775e5bd7f9d91c87236ef8251e88fbe034] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x1ce94f2dda858eccff4a096facf155f1517aeaab702969ec0f8b47ed2bc75a36] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x03ae9287f819a3b7b7a2b1d0e3c3d24a525d75ccf4e521d293bc6cf7835808ee] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x5bb2b014407d60458fefcc3fad705230d6bb438e7299876f799be6fa88d688ee] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xee06f8a85e4b44543cedd50b2fc36d619dc74345b9e3b2c1bee6243d98263850] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xcd575fc69bfa9b39787948ca92cd7c71a2f0129ad2f4a4e938bf1cfcc0c1f9fe] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xa2df34ce378e2ffd82a2ac527f9a75bc78243d1e3e034c2913c614bb2cdc6adc] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xa1edf60850286faa49a207a8bd0a9c21860320e073f445b970e04abcd1ff98da] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xb71838528ef676d2318fe092c6a3087255dbe40c85b4f45a6621c06abfcf9fe0] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0xab2dd34f6c0a3f4061dac8c0e96901ceb9d446eedbf3aa53e3c15537b3615c14] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x0d6b88c27b7bf6ccabbfb8434835f5775eec2dc24ed460f6d10d9c352e5052b3] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] [0x2c052046aaa2406dfe8078df29825175bd71ebc51f0639f8632f26a6bb741f82] Extrinsic invalid
2023-11-09 17:22:18.102 DEBUG tokio-runtime-worker txpool: [Parachain] 
...

and from this point onwards, the pool behaves like this:

2023-11-09 17:22:18.131 DEBUG tokio-runtime-worker txpool: [0x530acb65e7ec058420735c66830285dd49b704982a0b5a7d9228774bcba6cc51] Importing to future
2023-11-09 17:22:18.131 TRACE tokio-runtime-worker txpool: [0x530acb65e7ec058420735c66830285dd49b704982a0b5a7d9228774bcba6cc51] Future
2023-11-09 17:22:18.131 DEBUG tokio-runtime-worker txpool: Pool Status: PoolStatus { ready: 0, ready_bytes: 0, future: 1, future_bytes: 116 }
2023-11-09 17:22:18.131 TRACE tokio-runtime-worker txpool: [0xc446dc919f96de712cd70ec97f7cad56e3377c119870aaa353af6282e187df40] WaitingTransaction { imported_at: Instant { tv_sec: 19636, tv_nsec: 328659125 }, transaction: Transaction { hash: 0xc446dc919f96de712cd70ec97f7cad56e3377c119870aaa353af6282e187df40, priority: 1459, valid_till: 42, bytes: 116, propagate: true, source: TransactionSource::External, requires: [2be0efdc475edd252c5fbcf9366efb2d7add6ad890010000], provides: [2be0efdc475edd252c5fbcf9366efb2d7add6ad891010000], data: 842be0efdc475edd252c5fbcf9366efb2d7add6ad8cb5750528d43432c5552c69f13106b249ba367b895a379a8d82bc0a602e8b2d27fd51cb978c7b59a448676d5e96886bcbf4fcd0a10a3000d36623d4f3c0f928700b4004506000a034d2c74d87e9de5d38dd589eb66110a7cf5201e7204}, missing_tags: {2be0efdc475edd252c5fbcf9366efb2d7add6ad890010000}}
2023-11-09 17:22:18.131 DEBUG tokio-runtime-worker txpool: [0xc446dc919f96de712cd70ec97f7cad56e3377c119870aaa353af6282e187df40] Importing to future
2023-11-09 17:22:18.131 TRACE tokio-runtime-worker txpool: [0xc446dc919f96de712cd70ec97f7cad56e3377c119870aaa353af6282e187df40] Future
2023-11-09 17:22:18.131 DEBUG tokio-runtime-worker txpool: Pool Status: PoolStatus { ready: 0, ready_bytes: 0, future: 2, future_bytes: 232 }

all extrinsics were sent as immortal.

@bkchr
Copy link
Member Author

bkchr commented Nov 9, 2023

Looks exactly like the issue I described above. You are building a fork and then you include some transaction with a future nonce. This leads then to all its descendants being removed as well. You could for example not have transaction that depend on each other (by the nonce) and then you would not see this issue.

@ggwpez
Copy link
Member

ggwpez commented Nov 9, 2023

So if you use the sTPS tool then it should not happen, or? Since that is never re-using accounts.

@bkchr
Copy link
Member Author

bkchr commented Nov 10, 2023

Yes

@bernardoaraujor
Copy link
Contributor

sending txs from different accounts solved the issue.

michalkucharczyk added a commit that referenced this issue Nov 21, 2023
…ed (#2001)

This PR adds the `delayed_best_block` flag to `ParachainBlockImport`. If
not set, the `params.fork_choice` is not updated (to
`ForkChoiceStrategy::Custom`) during the block import.

When `delayed_best_block` is set to `false` all parachain blocks on the
[longest
fork](https://github.com/paritytech/polkadot-sdk/blob/552be4800d9e4b480f79a300fc531783e04be099/substrate/client/service/src/client/client.rs#L708-L709)
will be notified as the best block, allowing transaction pool to be
updated with every imported block.

Otherwise imported blocks will not be notified as best blocks
(`fork_choice=ForkChoiceStrategy::Custom(false)`), and transaction pool
would be updated only with best block received from relay-chain.

Improvement for: #1202

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
claravanstaden added a commit to Snowfork/polkadot-sdk that referenced this issue Dec 6, 2023
* [ci] Enable zombienet jobs in PRs (#2361)

Since preparation for the merge queues needs more time I'm enabling
zombienet jobs in PRs CI back.

* westend: remove SessionKeys migration already applied on-chain (#2363)

Westend now successfully updated to `spec: 103000`, we **have to
remove** the session keys migration before the next release as it
doesn't gracefully handle reapplying it.

* implementers-guide: update github link (#2368)

cc @joepetrowski

* Fix Typo: `PalletXcmExtrinsicsBenchmark` (#2354)

Missed in https://github.com/paritytech/polkadot-sdk/pull/1672

* add pallet nomination-pools versioned migration to kitchensink (#2167)

The versioned migrations are already there in pallet nomination-pools:

https://github.com/paritytech/polkadot-sdk/blob/f6ee4781f633f0f89598f7b230595afe401da8dc/substrate/frame/nomination-pools/src/migration.rs#L27-L48

Just updating the kitchensink runtime to point to them.

This is also nice because it points the dev to an example of how to use
`VersionedMigration`.

* fix typo (#2377)

* bump zombienet version `v1.3.80` (#2376)

New release includes logic to move all jobs to `spot instances`.
Thx!

* [NPoS] Check if staker is exposed in paged exposure storage entries (#2369)

Addresses a bug caused by
https://github.com/paritytech/polkadot-sdk/pull/1189. The changes are
still not released yet, so would like to push the fix soon so it can go
together with the release of the above PR.

`fast_unstake` checks if a staker is exposed in an era. However, this fn
is still returning whether the staker is exposed based on the old
storage item. This PR fixes that by looking in both old and new exposure
storages.

Also adds some integrity tests for paged exposures.

* Beefy: small fixes (#2378)

Related to #2285

- save the state of the BEEFY gadget after processing a finality proof.
We need this in order to avoid skipping blocks.
- avoid reprocessing the old state when not necessary

* crypto: `lazy_static` removed, light parser for address URI added (#2250)

The `lazy_static` package does not work well in `no-std`: it requires
`spin_no_std` feature, which also will propagate into `std` if enabled.
This is not what we want.

This PR provides simple address uri parser which allows to get rid of
_regex_ which was used to parse the address uri, what in turns allows to
remove lazy_static.

Three regular expressions
(`SS58_REGEX`,`SECRET_PHRASE_REGEX`,`JUNCTION_REGEX`) were replaced with
the parser which unifies all of them.

The new parser does not support Unicode, it is ASCII only.

Related to: #2044

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: command-bot <>

* [trivial] asset-hubs runtimes: fix incorrect doc-comments (#2384)

Fix some incorrect doc-comments

* Do not panic if the `fdlimit` call to increase the file descriptor limit fails (#2155)

# Description

Sometimes changing file descriptor limits is not allowed, but there is
no need to crash the node if/when this happens. Since `fdlimit`'s author
decided to use panics instead of returning `Result`, we need to catch
it.

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works (if applicable)

---------

Co-authored-by: Koute <koute@users.noreply.github.com>

* Relax `force_default_xcm_version` for testnet system parachains (#2385)

This PR fixes two things:
- relax `force_default_xcm_version` for testnet system parachains (e.g.
BridgeHubWestend has now 2 and there is no way to change it to 3, so we
need to call `force_xcm_version(3)` for every parachain that it is
connected to, because we send XCMv3 messages)
- add `Storage` item to `PolkadotXcm` pallet definition (now we cannot
see storage items for `pallet_xcm` in PJS)


## TODO

- [ ] when merged open PR to `polkadot-fellows/runtimes` repo

* Make collator RPC mode non-experimental (#2381)

The `--relay-chain-rpc-urls` CLI flag has been available for a while
now. We have collators with this running and parachain teams are also
using it. It should be fine now to remove the experimental status.

* Fix migrations and add CI check for new system chains (#2336)

Westend Collectives migration CI check can be fixed once we have
https://github.com/paritytech/try-runtime-cli/pull/58, will open another
PR once it is available.

- [x] Remove deprecated `DmpQueue` pallet from Rococo Contracts, the
migration is complete
- [x] Fix Asset Hub Rococo storage versions
- [x] Add migration check CI for Asset Hub Rococo and Westend Bridge Hub

* Bump bandersnatch VRF revision (#2389)

Closes https://github.com/paritytech/polkadot-sdk/issues/2327

cc @burdges

* Bump secp256k1 from 0.24.3 to 0.28.0 (#2357)

Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from
0.24.3 to 0.28.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md">secp256k1's
changelog</a>.</em></p>
<blockquote>
<h1>0.28.0 - 2023-10-23</h1>
<ul>
<li>Add bindings to the ElligatorSwift implementation <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/627">#627</a></li>
<li>Depend on recent release of <code>bitcoin_hashes</code> v0.13.0 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/621">#621</a></li>
<li>Add a verify function to <code>PublicKey</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/618">#618</a></li>
<li>Add serialize function for schnorr::Signature <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/607">#607</a></li>
<li>Bump MSRV to 1.48 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/595">#595</a></li>
<li>Remove implementations of <code>PartialEq</code>, <code>Eq</code>,
<code>PartialOrd</code>, <code>Ord</code>, and <code>Hash</code> from
the
<code>impl_array_newtype</code> macro. Users will now need to derive
these traits if they are wanted.</li>
</ul>
<h1>0.27.0 - 2023-03-15</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/588">Depend
on newly release <code>bitcoin_hashes</code> v0.12</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/578">Implement
<code>Debug</code> trait for <code>Scalar</code> type</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/582">Implement
<code>insecure-erase</code></a>.</li>
</ul>
<h1>0.26.0 - 2202-12-19</h1>
<ul>
<li>Update libsecp25k1 to v0.2.0</li>
</ul>
<h1>0.25.0 - 2022-12-07</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/548">Fix
soundness issue with <code>preallocated_gen_new</code></a></li>
<li>Update to <code>secp256k1-sys</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/549">v0.7.0</a></li>
<li>Use type system to <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/483">improve
safety</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/490">Change
secp256k1-sys symbol names to 0_6_1</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/499">Introduce
<code>rustfmt</code></a> to the codebase.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/507">Make
all raw pointer methods go through the CPtr trait</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/518">Make
comparison functions stable</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/512">Remove</a>
public constant <code>ONE_KEY</code> (consider using
<code>FromStr</code> as a replacement).</li>
</ul>
<h1>0.24.1 - 2022-10-25</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/491">Fix
broken deserialization logic of <code>KeyPair</code></a> that previously
always panicked. After the patch deserialization only panics if neither
the <code>global-context</code> nor the <code>alloc</code> (default)
feature is active.</li>
</ul>
<h1>0.24.0 - 2022-07-20</h1>
<ul>
<li>Upgrade to new release of <a
href="https://github.com/rust-bitcoin/bitcoin_hashes/releases/tag/0.11.0">bitcoin_hashes</a>.</li>
</ul>
<h1>0.23.4 - 2022-07-14</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/474">Disable
automatic rerandomization of contexts under WASM</a></li>
</ul>
<h1>0.23.3 - 2022-06-29</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/465">Add
must_use for mut self key manipulation methods</a></li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/466">Fix
fuzzing feature guard</a></li>
</ul>
<h1>0.23.2 - 2022-06-27</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/7de09c8050da12a13ef9ee3850597f69c887952d"><code>7de09c8</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Tracking PR for release: `secp256k1 v0...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3dc5b165401f249c01a88cec54061301cffd97a0"><code>3dc5b16</code></a>
Bump version to v0.28.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3aada83180beec2b9f5ab8e7b9280a5517d3bcde"><code>3aada83</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Add bindings to the ElligatorSwift imp...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/39febcb866ce285d53052a3636602f04483aa710"><code>39febcb</code></a>
Create rust-bidings</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/da4f67b274c3061717723a568cfb182e4e2e7cce"><code>da4f67b</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Update vendored lib secp256k1 to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/80b2a8d4aa6ffa72041d569eab2278cd8c1ace2a"><code>80b2a8d</code></a>
Update vendored libsecp to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/d2285c929a086276ce6d1670d795c49191e30c65"><code>d2285c9</code></a>
ci: Remove MIPS* from CI</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/0d58f50d523b40a78de0b87146208e3ad338c8ba"><code>0d58f50</code></a>
ci: generalize grp in &quot;illegal callback&quot; test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/acf9ac13e9f8df84dd52d2f012cda7211a6af10c"><code>acf9ac1</code></a>
delete <code>test_manual_create_destroy</code> test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/04ce50891bb0d49be5355f5c0d82db70d7dda65a"><code>04ce508</code></a>
lib: fix bad unit test</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.24.3...secp256k1-0.28.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=secp256k1&package-manager=cargo&previous-version=0.24.3&new-version=0.28.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Preserve artifact cache unless stale (#1918)

Co-authored-by: Marcin S <marcin@realemail.net>

* Pools: Add `MaxUnbonding` to metadata (#2397)

* Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2404)

Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 5.0.0 to 5.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.1.0</h2>
<ul>
<li>Add <code>annotations</code> input by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/992">docker/build-push-action#992</a></li>
<li>Add <code>secret-envs</code> input by <a
href="https://github.com/elias-lundgren"><code>@​elias-lundgren</code></a>
in <a
href="https://redirect.github.com/docker/build-push-action/pull/980">docker/build-push-action#980</a></li>
<li>Bump <code>@​babel/traverse</code> from 7.17.3 to 7.23.2 in <a
href="https://redirect.github.com/docker/build-push-action/pull/991">docker/build-push-action#991</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.13.0-rc.1 to
0.14.0 in <a
href="https://redirect.github.com/docker/build-push-action/pull/990">docker/build-push-action#990</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1006">docker/build-push-action#1006</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0">https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/build-push-action/commit/4a13e500e55cf31b7a5d59a38ab2040ab0f42f56"><code>4a13e50</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1006">#1006</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="https://github.com/docker/build-push-action/commit/74166686865cdc289a02f214871fb53447b73447"><code>7416668</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b4f76a5dc6a67282180eddc6d460f23bc97bfcbc"><code>b4f76a5</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.13.0 to
0.14.0</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b7feb766fae338d85274c87a9d0f24c09690dbe2"><code>b7feb76</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1005">#1005</a>
from crazy-max/ci-inspect</li>
<li><a
href="https://github.com/docker/build-push-action/commit/fae8018297c67066fff64a6e9c319c86f89b8982"><code>fae8018</code></a>
ci: inspect sbom and provenance</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b625868b13c3feb675cabbf9bfeb52ae94166606"><code>b625868</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1004">#1004</a>
from crazy-max/ci-update-buildx</li>
<li><a
href="https://github.com/docker/build-push-action/commit/5193ef1da6ea0d66de97d22817c258b203ade96a"><code>5193ef1</code></a>
ci: update buildx to latest</li>
<li><a
href="https://github.com/docker/build-push-action/commit/d3afd779e409ac26db5374fb27fe4aae9f6adb42"><code>d3afd77</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/991">#991</a>
from docker/dependabot/npm_and_yarn/babel/traverse-7....</li>
<li><a
href="https://github.com/docker/build-push-action/commit/7a786bb2b9408f7f997564f677248fabd4b886d5"><code>7a786bb</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/992">#992</a>
from crazy-max/annotations</li>
<li><a
href="https://github.com/docker/build-push-action/commit/c66ae3adcfbf698ecd851c6bb782654a0c6ffcae"><code>c66ae3a</code></a>
chore: update generated content</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/build-push-action/compare/0565240e2d4ab88bba5387d719585280857ece09...4a13e500e55cf31b7a5d59a38ab2040ab0f42f56">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=5.0.0&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove retry from backers on failed candidate validation (#2182)

Hey guys, as discussed I've changed the name to a more general one
`PvfExecKind`, is this good or too general?
Creating this as a draft, I still have to fix the tests.

Closes #1585

Kusama address: FkB6QEo8VnV3oifugNj5NeVG3Mvq1zFbrUu4P5YwRoe5mQN

---------

Co-authored-by: command-bot <>
Co-authored-by: Marcin S <marcin@realemail.net>

* bump zombienet version `v1.3.82` (#2396)

Includes:
 - bump `pjs` modules versions
- re-enable test disable in
https://github.com/paritytech/polkadot-sdk/pull/2294

---------

Co-authored-by: Bastian Köcher <info@kchr.de>

* `chain-spec-builder`: cleanup (#2174)

This PR removes:
-  `New`, `Generate`, `Edit` commands,
- `kitchensink` dependency
from the `chain-spec-builder` util.

New `convert-to-raw`, `update-code` commands were added.

Additionally renames the `runtime` command (which was added in #1256) to
`create`.

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>

* Refactor `ValidationError` (#2406)

* Add output positional arg to undying-collator cli (#2375)

Follow up from https://github.com/paritytech/polkadot-sdk/pull/2370 to
add `output` positional argument to undying-collator.

cc @JoshOrndorff

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* PVF worker: switch on seccomp networking restrictions (#2221)

* cumulus-consensus-common: block import: `delayed_best_block` flag added (#2001)

This PR adds the `delayed_best_block` flag to `ParachainBlockImport`. If
not set, the `params.fork_choice` is not updated (to
`ForkChoiceStrategy::Custom`) during the block import.

When `delayed_best_block` is set to `false` all parachain blocks on the
[longest
fork](https://github.com/paritytech/polkadot-sdk/blob/552be4800d9e4b480f79a300fc531783e04be099/substrate/client/service/src/client/client.rs#L708-L709)
will be notified as the best block, allowing transaction pool to be
updated with every imported block.

Otherwise imported blocks will not be notified as best blocks
(`fork_choice=ForkChoiceStrategy::Custom(false)`), and transaction pool
would be updated only with best block received from relay-chain.

Improvement for: #1202

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Different XCM builders, default one requires fee payment (#2253)

Adding on top of the new builder pattern for creating XCM programs, I'm
adding some more APIs:

```rust
let paying_fees: Xcm<()> = Xcm::builder() // Only allow paying for fees
  .withdraw_asset() // First instruction has to load the holding register
  .buy_execution() // Second instruction has to be `buy_execution`
  .build();

let paying_fees_invalid: Xcm<()> = Xcm::builder()
  .withdraw_asset()
  .build(); // Invalid, need to pay for fees

let not_paying_fees: Xcm<()> = Xcm::builder_unpaid()
  .unpaid_execution() // Needed
  .withdraw_asset()
  .deposit_asset()
  .build();

let all_goes: Xcm<()> = Xcm::builder_unsafe() // You can do anything
  .withdraw_asset()
  .deposit_asset()
  .build();
```

The invalid bits are because the methods don't even exist on the types
that you'd want to call them on.

---------

Co-authored-by: command-bot <>

* added action to pass review bot on merge queue (#2414)

This action will trigger when a merge queue is created and will add a
positive status check under the `review-bot` account, allowing the PR to
pass the required check for the merge.

---------

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Update tick collator for async backing (#1497)

This updates the tick runtime and polkadot-parachain collator to use
async backing.

* cumulus-test-service: block import fix (#2430)

This is follow-up for:
https://github.com/paritytech/polkadot-sdk/pull/2001

Block import queue for `test-parachain` (`cumulus-test-service`) shall
use delayed best block feature.

This should fixed broken zombienet tests.

* Deprecate `RewardDestination::Controller` (#2380)

Deprecates `RewardDestination::Controller` variant.

- [x] `RewardDestination::Controller` annotated with `#[deprecated]`.
- [x] `Controller` variant is now handled the same way as `Stash` in
`payout_stakers`.
- [x] `set_payee` errors if `RewardDestination::Controller` is provided.
- [x] Added `update_payee` call to lazily migrate
`RewardDestination::Controller` `Payee` storage entries to
`RewardDestination::Account(controller)` .
- [x] `payout_stakers_dead_controller` has been removed from benches &
weights - was not used.
- [x] Tests no longer use `RewardDestination::Controller`.

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: georgepisaltu <52418509+georgepisaltu@users.noreply.github.com>

* Revert docker images tag naming to <prnum-shortsha> (#2434)

Docker images from paritypr are also used in testnets. PR reverts docker
tags naming to a more convenient.

cc @PierreBesson

* Fixes import path in benchmark macro (#2437)

Fully-qualified path was not being used in benchmark macro for one of
the cases. This PR fixes this and removes the unnecessary import in a
couple of files, which I believe was done to fix this issue.

* PVF: Fix unshare "no such file or directory" error (#2426)

* Make TypeInfo for SkipCheckIfFeeless transparent, too (#2449)

The `SkipCheckifFeeless::IDENTIFIER` became transparent (ie was whatever
the inner signed ext was). This PR just makes the `TypeInfo` transparent
too, so that libraries that use said info to decode the data (ie subxt)
can behave identically whether or not the `SkipCheckifFeeless` wrapper
is used or not.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* work with additional key values (#1757)

Add the possibility to inject additional key-values in the
sproof-builder that generates the relay root that gets stored in
parachain-system.

Rationale: pallets that verify additional storage items (not those
verified by parachain-system) from the relay should be able to proof
against the relay root that gets stored in parachain-system. This PR
allows to create provide additional nibles that can later be used for
verifiability in other pallets

* polkadot-node-subsystems: `ChainApiBackend` added + `polkadot-debug` image version fixed (#2411)

The out-dated version (bad tag) of [polkadot
image](https://github.com/paritytech/polkadot-sdk/blob/ede4a362622dfa69eb167eaa876246b1289f4b41/.gitlab/pipeline/zombienet/cumulus.yml#L31)
([docker
info](https://hub.docker.com/layers/paritypr/polkadot-debug/master/images/sha256:adb1658052cf671b50c90d5cece5c7a131efa1a95978249bd5cb85a5ad654f7a?context=explore))
was used. This PR fixes this.

See also:
https://github.com/paritytech/polkadot-sdk/pull/2411#issuecomment-1822632724

Also adds an abstraction that allows asynchronous backends to be passed to `ChainApiSubsystem`
---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Remove `#[macro_use]` annotation from `mod service` in all nodes. (#2456)

This PR removes `#[macro_use]` from the service module in each of the
Substrate nodes in the repo.

* Parachain Template
* Polkadot Parachain
* Minimal Node
* Node Template
* Kitchen Sink Node

IDK why this annotation was present, maybe from when we had the
`new_partial!` macro?

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>

* Add `on-chain-release-build` feature for Collectives Westend (#2463)

Collectives Westend is missing an `on-chain-release-build` feature flag.

* CI: Disable runtime upgrade spec name check on Westend Asset Hub and fix Staking pallet migration (#2447)

Westend Asset Hub currently failing because the spec name is being
changed next runtime upgrade
(https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125).

This also fixes an idempotency issue with a staking pallet migration.
Similar issues will be caught automatically now that we've also updated
to try-runtime-cli v0.5.0 which checks for idempotency issues.

This also enables try-state checks running in the CI.

* sp-api: Move macro related re-exports to `__private` (#2446)

This moves the macro related re-exports to `__private` to make it more
obvious for downstream users that they are using an internal api.

---------

Co-authored-by: command-bot <>

* Fix trait imports from sp-api (#2472)

Broken after #2446.

* Amend staking docs to account for state of controller deprecation (#2451)

Amends some staking pallet docs, and deprecation comment, to adjust to
the latest controller deprecation state.

Note, do we need the `README.md` file, which is a duplicate of the
pallet docs? Docs would be easier to maintain, and less ambiguity for
devs to refer to, if we had one source of truth in the generated pallet
docs.

* Make publish CI consistant and bump to v0.3.0 (#2453)

* pallet-xcm: ensure xcm outcome is always complete, revert effects otherwise (#2405)

On extrinsics/call, ensure local XCM execution is complete/successful.
Otherwise, fail the extrinsic so that state changes don't get committed
to the db.

Added regression tests that fail without the fix.

fixes #2237

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* pallet-staking: Converts all math operations to safe (#2435)

This PR converts unsafe math operations to safe in the staking pallet.
 
Closes https://github.com/paritytech/polkadot-sdk/issues/2431

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>

* Adapt test worker to profile flag (#2450)

closes #2194 

cc @mrcnski

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Disable any peer connections for parachain nodes in pov-recovery zombienet test (#2475)

I noticed that this test broke at some point. The parachain nodes should
only acquire their blocks from the relay chain. But they were connecting
to their peers and started fetching blocks from there.

In this test I now take additional measures so we check that each nodes
really uses pov-recovery to get the blocks.

* Remove dmp-queue pallet from Rococo Asset Hub and Bridge Hub (#2483)

DMP queue migration is complete and the pallet should be removed to fix
the check runtime upgrade CI.

<img width="1501" alt="Screenshot 2023-11-24 at 16 05 37"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/ee1da6bb-2756-4423-8085-1e4c73553ad5">

<img width="1501" alt="Screenshot 2023-11-24 at 16 06 44"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/03f3e88f-aed8-4eaa-aab6-7998f72258be">

* relay-chain-consensus: set a fork_choice (#2462)

After #2001 the `fork_choice` strategy may remain uninitialized in the
block import pipeline which uses relay-chain verifier.
Refer to
https://github.com/paritytech/polkadot-sdk/pull/2430#issuecomment-1823979813
for some further discussion.

* Improve `UnpinHandleInner` debug (#2485)

Printing the `unpin_worker_sender` included the entire stacktrace and
that is a little bit too verbose.

* Derive `MaxEncodedLen` on `SlotDuration` (#2484)

# Description

Needed this in my code as part of the larger data structure.

---------

Co-authored-by: command-bot <>

* pallet-xcm: fix benchmarking (#2489)

Use non-zero weight limit in benchmarking `pallet_xcm::execute()` so the
given XCM actually executes.

* [NPoS] Use EraInfo to manipulate exposure in fast-unstake tests (#2459)

The FastUnstake pallet tests were previously directly modifying storage
items in the pallet-staking to alter exposure. However, due to the
introduction of the [new paged exposure
feature](https://github.com/paritytech/polkadot-sdk/pull/1189) these
tests were not testing against correct storage items. This issue
resulted in a bug that I didn't catch, which has been addressed in [this
fix](https://github.com/paritytech/polkadot-sdk/pull/2369).

This PR introduces a modification to how the pallet-fast-unstake handles
exposure. It now utilizes `pallet-staking::EraInfo` to set or mutate
Exposures.

* Remove `RuntimeApi` dependency on system parachain runtime code (#2455)

The last issue blocking the removal of the Polkadot and Kusama system
parachains from the repo in #1737 is the dependency on the runtime code
through the RuntimeApi in `polkadot-parachain`.

This PR introduces two fake runtimes to satisfy the build requirements
and changes the `new_partial` function to make it not be generic over
the runtimes.
The reason for the second runtime is the different Aura keys used in
Polkadot Asset Hub, as the impl for AuraApi depends on this type.
If this changes the `RuntimeApi` generic could be removed completely
from all functions in `services.rs` and and generic type parameters in
`services.rs` and specified as a concrete type to TFullClient`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Add missing workspace members (#2491)

The following members have been added:

```pre
cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal
cumulus/parachains/testnets-common
polkadot/node/tracking-allocator
substrate/frame/examples/frame-crate
```

CI check can be added after
https://github.com/paritytech/pipeline-scripts/pull/105 is merged.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>

* bump zombienet version `v1.3.83` (#2492)

Include fix for `0002-parachains-upgrade-smoke-test` test.

* Do not pollute global base path with export genesis/wasm (#2487)

Otherwise the user may runs into weird errors if there is already a db.

* Zombienet: add polkadot-debug image publish as needs for cumulus tests (#2493)

Add `build-push-image-polkadot-debug` job to needs since we changed to
use the polkadot-debug image from the current branch for cumulus test
and we need to be sure that the image is ready. Fix issues like
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4481059

cc: @bkchr

Co-authored-by: Bastian Köcher <git@kchr.de>

* polkadot-parachain: one chain-spec for all (#2457)

This PR removes some `ChainSpec` types which are not necessary
(left-overs from #1256). Currently `ChainSpec` does not have to be
generic over the specific `RuntimeGenesisConfig`, it is enough to use
single type for all:

https://github.com/paritytech/polkadot-sdk/blob/9f787018857660440182142adc806954d7d07709/cumulus/polkadot-parachain/src/chain_spec/mod.rs#L53-L54


related to: https://github.com/paritytech/polkadot-sdk/issues/25

---------

Co-authored-by: command-bot <>

* Update documentation for SafeMode and TxPause Pallets (#2413)

# Description

Documentation for the TxPause and SafeMode pallets.

Based on reading and the notes from the following related PRs:
- https://github.com/paritytech/substrate/pull/12092

I believe this also completes the checklist to be able to close the
related PRs:
- Close #302 
- Close #274

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* PVF: remove audit log access (#2461)

* New runtime `spec_version` format + backport of the bump to 1.4.0 (#2468)

## Overview

This PR aligns the `spec_version` formatting to the [recent
changes](https://github.com/polkadot-fellows/runtimes/pull/26/files#diff-efa4caeb17487ecb13d8f5eb7863c3241d84afa2e73fbf25909a2ca89df0f362R142)
made for the Polkadot/Kusama runtimes.

It also backports the latest version `v1.4.0` bumps as `1_004_000`.

## Details

During the switch from `v0.9` to `v1.x`, the format of the
`spec_version` was modified from: `(M)m_ppp` for a runtime considered on
version `M.m.pp`. For instance `0.9.42` had a `spec_version` of `9420`.

With the transition to `v1.x`, the format was changed to a bigger number
(still `u32`) formatted as `MM_mm_ppp` where `1.2.3` would be stored as
`01_02_003`.

This PR aligns the format with that has been introduced in the
fellowship repo: `MMM_mmm_ppp`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Zombienet tests - disputes on finalized blocks (#2184)

**Overview:**
Adding an extra malus variant focusing on disputing finalized blocks. It
will:
- wrap around approval-voting
- listen to `OverseerSignal::BlockFinalized` and when encountered start
a dispute for the `dispute_offset`th ancestor
- simply pass through all other messages and signals

Add zombienet tests testing various edgecases:
- disputing freshly finalized blocks
- disputing stale finalized blocks
- disputing eagerly pruned finalized blocks (might be separate PR)

**TODO:**
- [x] Register new malus variant
- [x] Simple pass through wrapper (approval-voting)
- [x] Simple network definition
- [x] Listen to block finalizations
- [x] Fetch ancestor hash
- [x] Fetch session index
- [x] Fetch candidate
- [x] Construct and send dispute message
- [x] zndsl test 1 checking that disputes on fresh finalizations resolve
valid Closes #1365
- [x] zndsl test 2 checking that disputes for too old finalized blocks
are not possible Closes #1364
- [ ] zndsl test 3 checking that disputes for candidates with eagerly
pruned relay parent state are handled correctly #1359 (deferred to a
separate PR)
- [x] Unit tests for new malus variant (testing cli etc)
- [x] Clean/streamline error handling
- [ ] ~~Ensure it tests properly on session boundaries~~

---------

Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Decomissioned PR-Custom-Review (#2503)

This PR decomissions
[`PR-Custom-Review`](https://github.com/paritytech/pr-custom-review) in
replacement for
[`Review-bot`](https://github.com/paritytech/review-bot).

* Build the standard library crates when building the runtimes (#2217)

Our executor currently only supports the WASM MVP feature set, however
nowadays when compiling WASM the Rust compiler has more features enabled
by default.

We do set the `-C target-cpu=mvp` flag to make sure that *our* code gets
compiled in a way that is compatible with our executor, however this
doesn't affect Rust's standard library crates (`std`, `core` and
`alloc`) which are by default precompiled and still can make use of
these extra features.

So in this PR we force the compiler to also compile the standard library
crates for us to make sure that they also only use the MVP features.

I've added the `WASM_BUILD_STD` environment variable which can be used
to disable this behavior if set to `0`.

Unfortunately this *will* slow down the compile times when building
runtimes, but there isn't much that we can do about that.

Fixes https://github.com/paritytech/polkadot-sdk/issues/1755

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* asset-hub-westend-integration-tests: add more asset transfers tests (#2488)

Just adds more tests.

* Remove the timestamp handler (#2506)

* Staking: `chill_other` takes stash instead of controller (#2501)

The `chill_other` call is the only staking call that explicitly requires
`controller` in its signature. This PR changes the controller arg to be
the stash instead, with `StakingLedger` then fetching the controller
from storage.

This is not a breaking change per se - the call types do not change, but
is noteworthy as UIs will now want to pass the stash account into
`chill_other` calls, & metadata will reflect this.

Note: This is very low impact. `chill_other` has [hardly ever been
used](https://polkadot.subscan.io/extrinsic?address=&module=staking&call=chill_other&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=9431&endBlock=)
on Polkadot - notwithstanding the one called 11 days ago at block
18177457 that was a part of test I did, the last call was made 493 days
ago. Only 2 calls have ever been successful.

Addresses controller deprecation #2500

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* CI: Fix `build-and-attach-release-runtimes.yml` (#2471)

Incorporate suggestion from release team to get this workflow working.

edit: worked on this test GH release:
https://github.com/paritytech/polkadot-sdk/releases/tag/liam-debug-ghw.
let's try it.

* Fixes cumulus README instructions (#2442)

README instructions fixes to be compatible with the `polkadot-prepare`
and `polkadot-execute` binary split.

* Pools: Add ability to configure commission claiming permissions (#2474)

Addresses #409.

This request has been raised by multiple community members - the ability
for the nomination pool root role to configure permissionless commission
claiming:

> Would it be possible to have a claim_commission_other extrinsic for
claiming commission of nomination pools permissionless?

This PR does not quite introduce this additional call, but amends
`do_claim_commission` to check a new `claim_permission` field in the
`Commission` struct, configured by an enum:

```
enum CommissionClaimPermission {
   Permissionless,
   Account(AccountId),
}
```
This can be optionally set in a bonded pool's
`commission.claim_permission` field:

```
struct BondedPool {
   commission: {
      <snip>
      claim_permission: Option<CommissionClaimPermission<T::AccountId>>,
   },
   <snip>
}
```

This is a new field and requires a migration to add it to existing
pools. This will be `None` on pool creation, falling back to the `root`
role having sole access to claim commission if it is not set; this is
the behaviour as it is today. Once set, the field _can_ be set to `None`
again.

#### Changes
- [x] Add `commision.claim_permission` field.
- [x] Add `can_claim_commission` and amend `do_claim_commission`.
- [x] Add `set_commission_claim_permission` call.
- [x] Test to cover new configs and call.
- [x] Add and amend benchmarks.
- [x] Generate new weights + slot into call
`set_commission_claim_permission`.
- [x] Add migration to introduce `commission.claim_permission`, bump
storage version.
- [x] Update Westend weights.
- [x] Migration working.

---------

Co-authored-by: command-bot <>

* Added NetworkId::PolkadotBulletin variant (#2517)

We're going to bridge Polkadot Bridge Hub with [Polkadot Bulletin
chain](https://github.com/zdave-parity/polkadot-bulletin-chain) soon
(and Rococo Bridge Hub with 1:1 copy of Polkadot Bulletin chain even
sooner), so we need a variant for that chain in `NetworkId`. As
suggested, I'm adding a new variant for it to the `NetworkId` (we may
have used `ByGenesis(_)`, but decision was made to have a dedicated
variant for that).

* polkadot: disable block authoring backoff on production networks (#2510)

Currently the polkadot node will backoff from block authoring if
finality starts lagging. This PR disables this mechanism on production
networks (polkadot and kusama) and adds a flags to optionally force
enabling it.

* Set `frame_system::LastRuntimeUpgrade` after running `try-runtime` migrations (#2515)

Sets `frame_system::LastRuntimeUpgrade` after running try-runtime
migrations to better emulate real behavior.

This fixes an issue where migrations using the spec version to determine
whether to execute can incorrectly fail idempotency checks.

@s0me0ne-unkn0wn noticed this issue with the session key migration
introduced in https://github.com/paritytech/polkadot-sdk/pull/2265.

* Increase `cargo-check-each-crate-macos` timeout (#2519)

* Moves all test runtimes to use `derive_impl` (#2409)

Step in https://github.com/paritytech/polkadot-sdk/issues/171

This PR adds `derive_impl` on all `frame_system` config impls for mock
runtimes. The overridden configs are maintained as of now to ensure
minimal changes.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* PVF: Add test instructions (#2058)

* Remove `wasm-builder`'s README (#2525)

Followup of https://github.com/paritytech/polkadot-sdk/pull/2217

This PR deletes the README of the `wasm-builder` crate and moves its
docs back into the rustdoc, [as requested
here](https://github.com/paritytech/polkadot-sdk/pull/2217#discussion_r1406401175).
(:

* Remove `im-online` pallet from Rococo and Westend (#2265)

Co-authored-by: ordian <write@reusable.software>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>

* polkadot: remove grandpa pause support (#2511)

This was never used and we probably don't need it anyway.

* Remove pov-recovery race condition/Improve zombienet test (#2526)

The test was a bit flaky on CI. 

There was a race condition in the pov-recovery system. If the timing is
bad, it can happen that a block waits for a parent that is already
queued for import. The check if a block has children waiting happens
when we insert into the import queue. So we need to do an additional
check once we receive the import notification for the parent block.

Second issue is that `alice` was missing `--in-peers 0` and `--out-peers
0`, so alice was sometimes still fetching block via sync and the
assertion on the logs in zombienet would fail.

There is another potential issue that I saw once locally. We have a
failing pov-recovery queue that fails from time to time to check that
the retry mechanism does what it should. We now make sure that the same
candidate is never failed twice, so the tests become more predictable.

* Rework the event system of `sc-network` (#1370)

This commit introduces a new concept called `NotificationService` which
allows Polkadot protocols to communicate with the underlying
notification protocol implementation directly, without routing events
through `NetworkWorker`. This implies that each protocol has its own
service which it uses to communicate with remote peers and that each
`NotificationService` is unique with respect to the underlying
notification protocol, meaning `NotificationService` for the transaction
protocol can only be used to send and receive transaction-related
notifications.

The `NotificationService` concept introduces two additional benefits:
  * allow protocols to start using custom handshakes
  * allow protocols to accept/reject inbound peers

Previously the validation of inbound connections was solely the
responsibility of `ProtocolController`. This caused issues with light
peers and `SyncingEngine` as `ProtocolController` would accept more
peers than `SyncingEngine` could accept which caused peers to have
differing views of their own states. `SyncingEngine` would reject excess
peers but these rejections were not properly communicated to those peers
causing them to assume that they were accepted.

With `NotificationService`, the local handshake is not sent to remote
peer if peer is rejected which allows it to detect that it was rejected.

This commit also deprecates the use of `NetworkEventStream` for all
notification-related events and going forward only DHT events are
provided through `NetworkEventStream`. If protocols wish to follow each
other's events, they must introduce additional abtractions, as is done
for GRANDPA and transactions protocols by following the syncing protocol
through `SyncEventStream`.

Fixes https://github.com/paritytech/polkadot-sdk/issues/512
Fixes https://github.com/paritytech/polkadot-sdk/issues/514
Fixes https://github.com/paritytech/polkadot-sdk/issues/515
Fixes https://github.com/paritytech/polkadot-sdk/issues/554
Fixes https://github.com/paritytech/polkadot-sdk/issues/556

---
These changes are transferred from
https://github.com/paritytech/substrate/pull/14197 but there are no
functional changes compared to that PR

---------

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>

* [ci] Run gitspiegel trigger with merge conflicts (#2531)

Currently gitspiegel trigger won't run if there is merge conflict. This
PR fixes it.

close https://github.com/paritytech/gitspiegel/issues/183

* Remove long deprecated `AllPalletsWithoutSystemReversed` (#2509)

Remove deprecated `AllPalletsXY` types.

They have been deprecated for nearly 1.5 years now, I think its fine to
remove them.
If anyone feels like we should first put a date on the deprecation as
stated in the deprecation guideline, feel free to speak up. To me it
looks like this has been forgotten and can be directly removed.

* Remove `dmp_queue` pallet from Westend SP runtimes  (#2516)

Westend SP dmp queue pallet removal is complete.

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 27"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/906246fb-3de9-4133-a827-431636a097ad">

<img width="1499" alt="Screenshot 2023-11-28 at 08 32 08"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/bde84891-b044-42c7-9a0b-59125cd24db1">

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 45"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/38337484-0856-45c0-b9ff-8c785bc3c0e3">

* Enable parallel key scraping (#1985)

closes #174

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* substrate-node: `NativeElseWasmExecutor` is no longer used (#2521)

This PR removes `NativeElseWasmExecutor` usage from substrate node.
Instead [`WasmExecutor<(sp_io::SubstrateHostFunctions,
sp_statement_store::runtime_api::HostFunctions)>`](https://github.com/paritytech/polkadot-sdk/blob/49a41ab3bb3f630c20e5b24cec8d92382404631c/substrate/bin/node/executor/src/lib.rs#L26)
is used.

Related to #2358.

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Remove system parachains Polkadot and Kusama runtimes (#1737)

Since the Polkadot and Kusama runtimes are no longer in the repo, the
relevant systems parachains runtimes also need to be removed. More
context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).

Removes the following:
- `asset-hub-kusama` and `asset-hub-polkadot`
- `bridge-hub-kusama` and `bridge-hub-polkadot`
- `collectives-polkadot`
- `glutton-kusama`

Partially solves #603 and adds to #1731.

* Improve `CodeExecutor` (#2358)

Since `sp-state-machine` and `GenesisConfigBuilderRuntimeCaller` always
set `use_native` to be false.
We should remove this param and make `NativeElseWasmExecutor` behave
like its name.
It could make the above components use the correct execution strategy.

Maybe polkadot do not need about `NativeElseWasmExecutor` anymore. But
it is still needed by other chains and it's useful for debugging.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

* add Rotko common good parachain nodes (#2533)

rotko networks parachain bootnodes 
```
# array of commands for testing
parachains=(
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/33514/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/34514/ws/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/35514/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/33524/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/34524/ws/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/35524/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/33534/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/34534/ws/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/35534/wss/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/33543/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/34543/ws/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/35543/wss/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/33553/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/34553/ws/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/35553/wss/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/33563/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/34563/ws/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/35563/wss/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/33573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/34573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/35573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/33593/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/34593/ws/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/35593/wss/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
)
```

* Bump fs4 from 0.6.6 to 0.7.0 (#1844)

* ParachainHost: No need to be generic over the block or hash type (#2537)

The `BlockNumber` and `Hash` are fixed types any way.

* Adding LuckyFriday's Bootnodes per IBP Application (#2538)

Good day,

This PR requests the inclusion of two bootnode entries for Polkadot,
Kusama and Westend as part of LuckyFriday's IBP application. The nodes
are hosted on self-owned hardware in a co-located facility. We've
undertaken connectivity tests ourselves and also from members of the
IBP.

The test commands used are as follows:

```
polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30333/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30334/wss/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30333/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30333/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks
```

All tests yielded syncing with 1 peer, a positive result. We have also
backed up our node-key in the event that restoration is required.

I hope that the aforementioned meets the requirement for inclusion and
look forward to a speedy turnaround.

Kind Regards,
Will | Paradox

* sp-api: Sprinkle some `automatically_derived` attributes

This attribute is informing tooling that the code is automatically
derived and thus, should not enable any linting.

* Disable trace-level logging from the `test-linux-stable-int` (#2546)

* chainHead: Backport error codes from spec (#2539)

This PR backports the error codes from the spec.

This relies on two specs for defining the error codes:
- Our rpc-spec-v2 https://github.com/paritytech/json-rpc-interface-spec.
- JSON-RPC spec https://www.jsonrpc.org/specification#error_object.

To better describe the error codes, they are divided into two separate
modules `rpc_spec_v2` and `json_rpc_spec` respectively.

The `InvalidSubscriptionID` and `FetchBlockHeader` are merged into the
JSON-RPC spec `INTERNAL_ERROR`.
While the other error codes are adjusted from spec.

Errors that are currently in use:
- -32801 block hash not reported by chainHead_follow or block hash has
been unpinned
- -32802 chainHead_follow started with withRuntime == false
- -32803 chainHead_follow did not generate an
operationWaitingForContinue event

The following are errors defined in the [JSON-RPC
spec](https://www.jsonrpc.org/specification#error_object):
- -32602 The provided parameter isn't one of the expected values, has
different format or is missing
- -32603 Internal server error

Note: Error `-32801` must be introduced and generated by the outstanding
https://github.com/paritytech/polkadot-sdk/issues/1505

Closes: https://github.com/paritytech/polkadot-sdk/issues/2530

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* state-db: log_target usage fixed (#2547)

Use `LOG_TARGET/LOG_TARGET_PIN` in logs.

* Parachain Template: Prune `AuxStore` bound and corresponding crate dependency (#2303)

This small PR removes an unnecessary trait bound to the `AuxStore` trait
from the Parachain template's `rpc.rs` file.

With that bound removed, the entire dependency on `sc-client-api` can
also be removed.

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>
Co-authored-by: Bastian Köcher <git@kchr.de>

* Contracts: use compiled rust tests (#2347)

see #2189

This PR does the following:
- Bring the user api functions into a new pallet-contracts-uapi (They
are currently defined in ink!
[here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs)
- Add older api versions and unstable to the user api trait.
- Remove pallet-contracts-primitives and bring the types it defined in
uapi / pallet-contracts
- Add the infrastructure to build fixtures from Rust files and test it
works by replacing `dummy.wat` and `call.wat`
- Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.

This will be done in a follow up:
- convert the rest of the test from .wat to rust
- bring risc-v uapi up to date with wasm
- finalize the uapi host fns, making sure everything is codegen from the
source host fns in pallet-contracts

---------

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* upgraded review bot to 2.3.0 (#2549)

Upgraded to version 2.3.0 which includes:
- paritytech/review-bot#103
- paritytech/review-bot#102

* Register metrics for the notification handles (#2562)

Add metrics for notification handles so substream events are correctly
reported to Prometheus

* Introduce Polkadot-Sdk `developer_hub`  (#2102)

This PR introduces the new crate `developer_hub` into the polkadot-sdk
repo. The vision for the developer-hub crate is detailed in [this
document](https://docs.google.com/document/d/1XLLkFNE8v8HLvZpI2rzsa8N2IN1FcKntc8q-Sc4xBAk/edit?usp=sharing).

<img width="1128" alt="Screenshot 2023-11-02 at 10 45 48"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/1e12b60f-fef5-42c4-8503-a3ba234077c3">


Other than adding the new crate, it also does the following: 

* Remove the `substrate` crate, as there is now a unique umbrella crate
for multiple things in `developer_hub::polkadot_sdk`.
* (backport candidate) A minor change to `frame-support` macros that
allows `T::RuntimeOrigin` to also be acceptable as the origin type.
* (backport candidate) A minor change to `frame-system` that allows us
to deposit events at genesis because now the real genesis config is
generated via wasm, and we can safely assume `cfg!(feature = "std")`
means only testing. related to #62.
* (backport candidate) Introduces a small `read_events_for_pallet` to
`frame_system` for easier event reading in tests.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `pallet::call` docs.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `UncheckedExtrinsic` docs.

## Way Forward

First, a version of this is deployed temporarily
[here](https://blog.kianenigma.nl/polkadot-sdk/developer_hub/index.html).
I will keep it up to date on a daily basis.

### This Pull Request

I see two ways forward: 

1. We acknowledge that everything in `developer-hub` is going to be WIP,
and merge this asap. We should not yet use links to this crate anywhere.
2. We make this be the feature branch, make PRs against this, and either
gradually backport it, or only merge to master once it is done.

I am personally in favor of option 1. If we stick to option 2, we need a
better way to deploy a staging version of this to gh-pages.

### Issue Tracking

The main issues related to the future of `developer_hub` are: 

- https://github.com/paritytech/polkadot-sdk-docs/issues/31
- https://github.com/paritytech/polkadot-sdk-docs/issues/4
- https://github.com/paritytech/polkadot-sdk-docs/issues/26 
- https://github.com/paritytech/polkadot-sdk-docs/issues/32
- https://github.com/paritytech/polkadot-sdk-docs/issues/36


### After This Pull Request

- [ ] create a redirect for
https://paritytech.github.io/polkadot-sdk/master/substrate/
- [x] analy…
claravanstaden added a commit to Snowfork/polkadot-sdk that referenced this issue Dec 6, 2023
* [ci] Enable zombienet jobs in PRs (#2361)

Since preparation for the merge queues needs more time I'm enabling
zombienet jobs in PRs CI back.

* westend: remove SessionKeys migration already applied on-chain (#2363)

Westend now successfully updated to `spec: 103000`, we **have to
remove** the session keys migration before the next release as it
doesn't gracefully handle reapplying it.

* implementers-guide: update github link (#2368)

cc @joepetrowski

* Fix Typo: `PalletXcmExtrinsicsBenchmark` (#2354)

Missed in https://github.com/paritytech/polkadot-sdk/pull/1672

* add pallet nomination-pools versioned migration to kitchensink (#2167)

The versioned migrations are already there in pallet nomination-pools:

https://github.com/paritytech/polkadot-sdk/blob/f6ee4781f633f0f89598f7b230595afe401da8dc/substrate/frame/nomination-pools/src/migration.rs#L27-L48

Just updating the kitchensink runtime to point to them.

This is also nice because it points the dev to an example of how to use
`VersionedMigration`.

* fix typo (#2377)

* bump zombienet version `v1.3.80` (#2376)

New release includes logic to move all jobs to `spot instances`.
Thx!

* [NPoS] Check if staker is exposed in paged exposure storage entries (#2369)

Addresses a bug caused by
https://github.com/paritytech/polkadot-sdk/pull/1189. The changes are
still not released yet, so would like to push the fix soon so it can go
together with the release of the above PR.

`fast_unstake` checks if a staker is exposed in an era. However, this fn
is still returning whether the staker is exposed based on the old
storage item. This PR fixes that by looking in both old and new exposure
storages.

Also adds some integrity tests for paged exposures.

* Beefy: small fixes (#2378)

Related to #2285

- save the state of the BEEFY gadget after processing a finality proof.
We need this in order to avoid skipping blocks.
- avoid reprocessing the old state when not necessary

* crypto: `lazy_static` removed, light parser for address URI added (#2250)

The `lazy_static` package does not work well in `no-std`: it requires
`spin_no_std` feature, which also will propagate into `std` if enabled.
This is not what we want.

This PR provides simple address uri parser which allows to get rid of
_regex_ which was used to parse the address uri, what in turns allows to
remove lazy_static.

Three regular expressions
(`SS58_REGEX`,`SECRET_PHRASE_REGEX`,`JUNCTION_REGEX`) were replaced with
the parser which unifies all of them.

The new parser does not support Unicode, it is ASCII only.

Related to: #2044

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: command-bot <>

* [trivial] asset-hubs runtimes: fix incorrect doc-comments (#2384)

Fix some incorrect doc-comments

* Do not panic if the `fdlimit` call to increase the file descriptor limit fails (#2155)

# Description

Sometimes changing file descriptor limits is not allowed, but there is
no need to crash the node if/when this happens. Since `fdlimit`'s author
decided to use panics instead of returning `Result`, we need to catch
it.

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works (if applicable)

---------

Co-authored-by: Koute <koute@users.noreply.github.com>

* Relax `force_default_xcm_version` for testnet system parachains (#2385)

This PR fixes two things:
- relax `force_default_xcm_version` for testnet system parachains (e.g.
BridgeHubWestend has now 2 and there is no way to change it to 3, so we
need to call `force_xcm_version(3)` for every parachain that it is
connected to, because we send XCMv3 messages)
- add `Storage` item to `PolkadotXcm` pallet definition (now we cannot
see storage items for `pallet_xcm` in PJS)


## TODO

- [ ] when merged open PR to `polkadot-fellows/runtimes` repo

* Make collator RPC mode non-experimental (#2381)

The `--relay-chain-rpc-urls` CLI flag has been available for a while
now. We have collators with this running and parachain teams are also
using it. It should be fine now to remove the experimental status.

* Fix migrations and add CI check for new system chains (#2336)

Westend Collectives migration CI check can be fixed once we have
https://github.com/paritytech/try-runtime-cli/pull/58, will open another
PR once it is available.

- [x] Remove deprecated `DmpQueue` pallet from Rococo Contracts, the
migration is complete
- [x] Fix Asset Hub Rococo storage versions
- [x] Add migration check CI for Asset Hub Rococo and Westend Bridge Hub

* Bump bandersnatch VRF revision (#2389)

Closes https://github.com/paritytech/polkadot-sdk/issues/2327

cc @burdges

* Bump secp256k1 from 0.24.3 to 0.28.0 (#2357)

Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from
0.24.3 to 0.28.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md">secp256k1's
changelog</a>.</em></p>
<blockquote>
<h1>0.28.0 - 2023-10-23</h1>
<ul>
<li>Add bindings to the ElligatorSwift implementation <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/627">#627</a></li>
<li>Depend on recent release of <code>bitcoin_hashes</code> v0.13.0 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/621">#621</a></li>
<li>Add a verify function to <code>PublicKey</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/618">#618</a></li>
<li>Add serialize function for schnorr::Signature <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/607">#607</a></li>
<li>Bump MSRV to 1.48 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/595">#595</a></li>
<li>Remove implementations of <code>PartialEq</code>, <code>Eq</code>,
<code>PartialOrd</code>, <code>Ord</code>, and <code>Hash</code> from
the
<code>impl_array_newtype</code> macro. Users will now need to derive
these traits if they are wanted.</li>
</ul>
<h1>0.27.0 - 2023-03-15</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/588">Depend
on newly release <code>bitcoin_hashes</code> v0.12</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/578">Implement
<code>Debug</code> trait for <code>Scalar</code> type</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/582">Implement
<code>insecure-erase</code></a>.</li>
</ul>
<h1>0.26.0 - 2202-12-19</h1>
<ul>
<li>Update libsecp25k1 to v0.2.0</li>
</ul>
<h1>0.25.0 - 2022-12-07</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/548">Fix
soundness issue with <code>preallocated_gen_new</code></a></li>
<li>Update to <code>secp256k1-sys</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/549">v0.7.0</a></li>
<li>Use type system to <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/483">improve
safety</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/490">Change
secp256k1-sys symbol names to 0_6_1</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/499">Introduce
<code>rustfmt</code></a> to the codebase.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/507">Make
all raw pointer methods go through the CPtr trait</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/518">Make
comparison functions stable</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/512">Remove</a>
public constant <code>ONE_KEY</code> (consider using
<code>FromStr</code> as a replacement).</li>
</ul>
<h1>0.24.1 - 2022-10-25</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/491">Fix
broken deserialization logic of <code>KeyPair</code></a> that previously
always panicked. After the patch deserialization only panics if neither
the <code>global-context</code> nor the <code>alloc</code> (default)
feature is active.</li>
</ul>
<h1>0.24.0 - 2022-07-20</h1>
<ul>
<li>Upgrade to new release of <a
href="https://github.com/rust-bitcoin/bitcoin_hashes/releases/tag/0.11.0">bitcoin_hashes</a>.</li>
</ul>
<h1>0.23.4 - 2022-07-14</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/474">Disable
automatic rerandomization of contexts under WASM</a></li>
</ul>
<h1>0.23.3 - 2022-06-29</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/465">Add
must_use for mut self key manipulation methods</a></li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/466">Fix
fuzzing feature guard</a></li>
</ul>
<h1>0.23.2 - 2022-06-27</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/7de09c8050da12a13ef9ee3850597f69c887952d"><code>7de09c8</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Tracking PR for release: `secp256k1 v0...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3dc5b165401f249c01a88cec54061301cffd97a0"><code>3dc5b16</code></a>
Bump version to v0.28.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3aada83180beec2b9f5ab8e7b9280a5517d3bcde"><code>3aada83</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Add bindings to the ElligatorSwift imp...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/39febcb866ce285d53052a3636602f04483aa710"><code>39febcb</code></a>
Create rust-bidings</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/da4f67b274c3061717723a568cfb182e4e2e7cce"><code>da4f67b</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Update vendored lib secp256k1 to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/80b2a8d4aa6ffa72041d569eab2278cd8c1ace2a"><code>80b2a8d</code></a>
Update vendored libsecp to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/d2285c929a086276ce6d1670d795c49191e30c65"><code>d2285c9</code></a>
ci: Remove MIPS* from CI</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/0d58f50d523b40a78de0b87146208e3ad338c8ba"><code>0d58f50</code></a>
ci: generalize grp in &quot;illegal callback&quot; test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/acf9ac13e9f8df84dd52d2f012cda7211a6af10c"><code>acf9ac1</code></a>
delete <code>test_manual_create_destroy</code> test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/04ce50891bb0d49be5355f5c0d82db70d7dda65a"><code>04ce508</code></a>
lib: fix bad unit test</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.24.3...secp256k1-0.28.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=secp256k1&package-manager=cargo&previous-version=0.24.3&new-version=0.28.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Preserve artifact cache unless stale (#1918)

Co-authored-by: Marcin S <marcin@realemail.net>

* Pools: Add `MaxUnbonding` to metadata (#2397)

* Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2404)

Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 5.0.0 to 5.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.1.0</h2>
<ul>
<li>Add <code>annotations</code> input by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/992">docker/build-push-action#992</a></li>
<li>Add <code>secret-envs</code> input by <a
href="https://github.com/elias-lundgren"><code>@​elias-lundgren</code></a>
in <a
href="https://redirect.github.com/docker/build-push-action/pull/980">docker/build-push-action#980</a></li>
<li>Bump <code>@​babel/traverse</code> from 7.17.3 to 7.23.2 in <a
href="https://redirect.github.com/docker/build-push-action/pull/991">docker/build-push-action#991</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.13.0-rc.1 to
0.14.0 in <a
href="https://redirect.github.com/docker/build-push-action/pull/990">docker/build-push-action#990</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1006">docker/build-push-action#1006</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0">https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/build-push-action/commit/4a13e500e55cf31b7a5d59a38ab2040ab0f42f56"><code>4a13e50</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1006">#1006</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="https://github.com/docker/build-push-action/commit/74166686865cdc289a02f214871fb53447b73447"><code>7416668</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b4f76a5dc6a67282180eddc6d460f23bc97bfcbc"><code>b4f76a5</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.13.0 to
0.14.0</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b7feb766fae338d85274c87a9d0f24c09690dbe2"><code>b7feb76</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1005">#1005</a>
from crazy-max/ci-inspect</li>
<li><a
href="https://github.com/docker/build-push-action/commit/fae8018297c67066fff64a6e9c319c86f89b8982"><code>fae8018</code></a>
ci: inspect sbom and provenance</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b625868b13c3feb675cabbf9bfeb52ae94166606"><code>b625868</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1004">#1004</a>
from crazy-max/ci-update-buildx</li>
<li><a
href="https://github.com/docker/build-push-action/commit/5193ef1da6ea0d66de97d22817c258b203ade96a"><code>5193ef1</code></a>
ci: update buildx to latest</li>
<li><a
href="https://github.com/docker/build-push-action/commit/d3afd779e409ac26db5374fb27fe4aae9f6adb42"><code>d3afd77</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/991">#991</a>
from docker/dependabot/npm_and_yarn/babel/traverse-7....</li>
<li><a
href="https://github.com/docker/build-push-action/commit/7a786bb2b9408f7f997564f677248fabd4b886d5"><code>7a786bb</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/992">#992</a>
from crazy-max/annotations</li>
<li><a
href="https://github.com/docker/build-push-action/commit/c66ae3adcfbf698ecd851c6bb782654a0c6ffcae"><code>c66ae3a</code></a>
chore: update generated content</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/build-push-action/compare/0565240e2d4ab88bba5387d719585280857ece09...4a13e500e55cf31b7a5d59a38ab2040ab0f42f56">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=5.0.0&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove retry from backers on failed candidate validation (#2182)

Hey guys, as discussed I've changed the name to a more general one
`PvfExecKind`, is this good or too general?
Creating this as a draft, I still have to fix the tests.

Closes #1585

Kusama address: FkB6QEo8VnV3oifugNj5NeVG3Mvq1zFbrUu4P5YwRoe5mQN

---------

Co-authored-by: command-bot <>
Co-authored-by: Marcin S <marcin@realemail.net>

* bump zombienet version `v1.3.82` (#2396)

Includes:
 - bump `pjs` modules versions
- re-enable test disable in
https://github.com/paritytech/polkadot-sdk/pull/2294

---------

Co-authored-by: Bastian Köcher <info@kchr.de>

* `chain-spec-builder`: cleanup (#2174)

This PR removes:
-  `New`, `Generate`, `Edit` commands,
- `kitchensink` dependency
from the `chain-spec-builder` util.

New `convert-to-raw`, `update-code` commands were added.

Additionally renames the `runtime` command (which was added in #1256) to
`create`.

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>

* Refactor `ValidationError` (#2406)

* Add output positional arg to undying-collator cli (#2375)

Follow up from https://github.com/paritytech/polkadot-sdk/pull/2370 to
add `output` positional argument to undying-collator.

cc @JoshOrndorff

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* PVF worker: switch on seccomp networking restrictions (#2221)

* cumulus-consensus-common: block import: `delayed_best_block` flag added (#2001)

This PR adds the `delayed_best_block` flag to `ParachainBlockImport`. If
not set, the `params.fork_choice` is not updated (to
`ForkChoiceStrategy::Custom`) during the block import.

When `delayed_best_block` is set to `false` all parachain blocks on the
[longest
fork](https://github.com/paritytech/polkadot-sdk/blob/552be4800d9e4b480f79a300fc531783e04be099/substrate/client/service/src/client/client.rs#L708-L709)
will be notified as the best block, allowing transaction pool to be
updated with every imported block.

Otherwise imported blocks will not be notified as best blocks
(`fork_choice=ForkChoiceStrategy::Custom(false)`), and transaction pool
would be updated only with best block received from relay-chain.

Improvement for: #1202

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Different XCM builders, default one requires fee payment (#2253)

Adding on top of the new builder pattern for creating XCM programs, I'm
adding some more APIs:

```rust
let paying_fees: Xcm<()> = Xcm::builder() // Only allow paying for fees
  .withdraw_asset() // First instruction has to load the holding register
  .buy_execution() // Second instruction has to be `buy_execution`
  .build();

let paying_fees_invalid: Xcm<()> = Xcm::builder()
  .withdraw_asset()
  .build(); // Invalid, need to pay for fees

let not_paying_fees: Xcm<()> = Xcm::builder_unpaid()
  .unpaid_execution() // Needed
  .withdraw_asset()
  .deposit_asset()
  .build();

let all_goes: Xcm<()> = Xcm::builder_unsafe() // You can do anything
  .withdraw_asset()
  .deposit_asset()
  .build();
```

The invalid bits are because the methods don't even exist on the types
that you'd want to call them on.

---------

Co-authored-by: command-bot <>

* added action to pass review bot on merge queue (#2414)

This action will trigger when a merge queue is created and will add a
positive status check under the `review-bot` account, allowing the PR to
pass the required check for the merge.

---------

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Update tick collator for async backing (#1497)

This updates the tick runtime and polkadot-parachain collator to use
async backing.

* cumulus-test-service: block import fix (#2430)

This is follow-up for:
https://github.com/paritytech/polkadot-sdk/pull/2001

Block import queue for `test-parachain` (`cumulus-test-service`) shall
use delayed best block feature.

This should fixed broken zombienet tests.

* Deprecate `RewardDestination::Controller` (#2380)

Deprecates `RewardDestination::Controller` variant.

- [x] `RewardDestination::Controller` annotated with `#[deprecated]`.
- [x] `Controller` variant is now handled the same way as `Stash` in
`payout_stakers`.
- [x] `set_payee` errors if `RewardDestination::Controller` is provided.
- [x] Added `update_payee` call to lazily migrate
`RewardDestination::Controller` `Payee` storage entries to
`RewardDestination::Account(controller)` .
- [x] `payout_stakers_dead_controller` has been removed from benches &
weights - was not used.
- [x] Tests no longer use `RewardDestination::Controller`.

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: georgepisaltu <52418509+georgepisaltu@users.noreply.github.com>

* Revert docker images tag naming to <prnum-shortsha> (#2434)

Docker images from paritypr are also used in testnets. PR reverts docker
tags naming to a more convenient.

cc @PierreBesson

* Fixes import path in benchmark macro (#2437)

Fully-qualified path was not being used in benchmark macro for one of
the cases. This PR fixes this and removes the unnecessary import in a
couple of files, which I believe was done to fix this issue.

* PVF: Fix unshare "no such file or directory" error (#2426)

* Make TypeInfo for SkipCheckIfFeeless transparent, too (#2449)

The `SkipCheckifFeeless::IDENTIFIER` became transparent (ie was whatever
the inner signed ext was). This PR just makes the `TypeInfo` transparent
too, so that libraries that use said info to decode the data (ie subxt)
can behave identically whether or not the `SkipCheckifFeeless` wrapper
is used or not.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* work with additional key values (#1757)

Add the possibility to inject additional key-values in the
sproof-builder that generates the relay root that gets stored in
parachain-system.

Rationale: pallets that verify additional storage items (not those
verified by parachain-system) from the relay should be able to proof
against the relay root that gets stored in parachain-system. This PR
allows to create provide additional nibles that can later be used for
verifiability in other pallets

* polkadot-node-subsystems: `ChainApiBackend` added + `polkadot-debug` image version fixed (#2411)

The out-dated version (bad tag) of [polkadot
image](https://github.com/paritytech/polkadot-sdk/blob/ede4a362622dfa69eb167eaa876246b1289f4b41/.gitlab/pipeline/zombienet/cumulus.yml#L31)
([docker
info](https://hub.docker.com/layers/paritypr/polkadot-debug/master/images/sha256:adb1658052cf671b50c90d5cece5c7a131efa1a95978249bd5cb85a5ad654f7a?context=explore))
was used. This PR fixes this.

See also:
https://github.com/paritytech/polkadot-sdk/pull/2411#issuecomment-1822632724

Also adds an abstraction that allows asynchronous backends to be passed to `ChainApiSubsystem`
---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Remove `#[macro_use]` annotation from `mod service` in all nodes. (#2456)

This PR removes `#[macro_use]` from the service module in each of the
Substrate nodes in the repo.

* Parachain Template
* Polkadot Parachain
* Minimal Node
* Node Template
* Kitchen Sink Node

IDK why this annotation was present, maybe from when we had the
`new_partial!` macro?

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>

* Add `on-chain-release-build` feature for Collectives Westend (#2463)

Collectives Westend is missing an `on-chain-release-build` feature flag.

* CI: Disable runtime upgrade spec name check on Westend Asset Hub and fix Staking pallet migration (#2447)

Westend Asset Hub currently failing because the spec name is being
changed next runtime upgrade
(https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125).

This also fixes an idempotency issue with a staking pallet migration.
Similar issues will be caught automatically now that we've also updated
to try-runtime-cli v0.5.0 which checks for idempotency issues.

This also enables try-state checks running in the CI.

* sp-api: Move macro related re-exports to `__private` (#2446)

This moves the macro related re-exports to `__private` to make it more
obvious for downstream users that they are using an internal api.

---------

Co-authored-by: command-bot <>

* Fix trait imports from sp-api (#2472)

Broken after #2446.

* Amend staking docs to account for state of controller deprecation (#2451)

Amends some staking pallet docs, and deprecation comment, to adjust to
the latest controller deprecation state.

Note, do we need the `README.md` file, which is a duplicate of the
pallet docs? Docs would be easier to maintain, and less ambiguity for
devs to refer to, if we had one source of truth in the generated pallet
docs.

* Make publish CI consistant and bump to v0.3.0 (#2453)

* pallet-xcm: ensure xcm outcome is always complete, revert effects otherwise (#2405)

On extrinsics/call, ensure local XCM execution is complete/successful.
Otherwise, fail the extrinsic so that state changes don't get committed
to the db.

Added regression tests that fail without the fix.

fixes #2237

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* pallet-staking: Converts all math operations to safe (#2435)

This PR converts unsafe math operations to safe in the staking pallet.
 
Closes https://github.com/paritytech/polkadot-sdk/issues/2431

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>

* Adapt test worker to profile flag (#2450)

closes #2194 

cc @mrcnski

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Disable any peer connections for parachain nodes in pov-recovery zombienet test (#2475)

I noticed that this test broke at some point. The parachain nodes should
only acquire their blocks from the relay chain. But they were connecting
to their peers and started fetching blocks from there.

In this test I now take additional measures so we check that each nodes
really uses pov-recovery to get the blocks.

* Remove dmp-queue pallet from Rococo Asset Hub and Bridge Hub (#2483)

DMP queue migration is complete and the pallet should be removed to fix
the check runtime upgrade CI.

<img width="1501" alt="Screenshot 2023-11-24 at 16 05 37"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/ee1da6bb-2756-4423-8085-1e4c73553ad5">

<img width="1501" alt="Screenshot 2023-11-24 at 16 06 44"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/03f3e88f-aed8-4eaa-aab6-7998f72258be">

* relay-chain-consensus: set a fork_choice (#2462)

After #2001 the `fork_choice` strategy may remain uninitialized in the
block import pipeline which uses relay-chain verifier.
Refer to
https://github.com/paritytech/polkadot-sdk/pull/2430#issuecomment-1823979813
for some further discussion.

* Improve `UnpinHandleInner` debug (#2485)

Printing the `unpin_worker_sender` included the entire stacktrace and
that is a little bit too verbose.

* Derive `MaxEncodedLen` on `SlotDuration` (#2484)

# Description

Needed this in my code as part of the larger data structure.

---------

Co-authored-by: command-bot <>

* pallet-xcm: fix benchmarking (#2489)

Use non-zero weight limit in benchmarking `pallet_xcm::execute()` so the
given XCM actually executes.

* [NPoS] Use EraInfo to manipulate exposure in fast-unstake tests (#2459)

The FastUnstake pallet tests were previously directly modifying storage
items in the pallet-staking to alter exposure. However, due to the
introduction of the [new paged exposure
feature](https://github.com/paritytech/polkadot-sdk/pull/1189) these
tests were not testing against correct storage items. This issue
resulted in a bug that I didn't catch, which has been addressed in [this
fix](https://github.com/paritytech/polkadot-sdk/pull/2369).

This PR introduces a modification to how the pallet-fast-unstake handles
exposure. It now utilizes `pallet-staking::EraInfo` to set or mutate
Exposures.

* Remove `RuntimeApi` dependency on system parachain runtime code (#2455)

The last issue blocking the removal of the Polkadot and Kusama system
parachains from the repo in #1737 is the dependency on the runtime code
through the RuntimeApi in `polkadot-parachain`.

This PR introduces two fake runtimes to satisfy the build requirements
and changes the `new_partial` function to make it not be generic over
the runtimes.
The reason for the second runtime is the different Aura keys used in
Polkadot Asset Hub, as the impl for AuraApi depends on this type.
If this changes the `RuntimeApi` generic could be removed completely
from all functions in `services.rs` and and generic type parameters in
`services.rs` and specified as a concrete type to TFullClient`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Add missing workspace members (#2491)

The following members have been added:

```pre
cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal
cumulus/parachains/testnets-common
polkadot/node/tracking-allocator
substrate/frame/examples/frame-crate
```

CI check can be added after
https://github.com/paritytech/pipeline-scripts/pull/105 is merged.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>

* bump zombienet version `v1.3.83` (#2492)

Include fix for `0002-parachains-upgrade-smoke-test` test.

* Do not pollute global base path with export genesis/wasm (#2487)

Otherwise the user may runs into weird errors if there is already a db.

* Zombienet: add polkadot-debug image publish as needs for cumulus tests (#2493)

Add `build-push-image-polkadot-debug` job to needs since we changed to
use the polkadot-debug image from the current branch for cumulus test
and we need to be sure that the image is ready. Fix issues like
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4481059

cc: @bkchr

Co-authored-by: Bastian Köcher <git@kchr.de>

* polkadot-parachain: one chain-spec for all (#2457)

This PR removes some `ChainSpec` types which are not necessary
(left-overs from #1256). Currently `ChainSpec` does not have to be
generic over the specific `RuntimeGenesisConfig`, it is enough to use
single type for all:

https://github.com/paritytech/polkadot-sdk/blob/9f787018857660440182142adc806954d7d07709/cumulus/polkadot-parachain/src/chain_spec/mod.rs#L53-L54


related to: https://github.com/paritytech/polkadot-sdk/issues/25

---------

Co-authored-by: command-bot <>

* Update documentation for SafeMode and TxPause Pallets (#2413)

# Description

Documentation for the TxPause and SafeMode pallets.

Based on reading and the notes from the following related PRs:
- https://github.com/paritytech/substrate/pull/12092

I believe this also completes the checklist to be able to close the
related PRs:
- Close #302 
- Close #274

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* PVF: remove audit log access (#2461)

* New runtime `spec_version` format + backport of the bump to 1.4.0 (#2468)

## Overview

This PR aligns the `spec_version` formatting to the [recent
changes](https://github.com/polkadot-fellows/runtimes/pull/26/files#diff-efa4caeb17487ecb13d8f5eb7863c3241d84afa2e73fbf25909a2ca89df0f362R142)
made for the Polkadot/Kusama runtimes.

It also backports the latest version `v1.4.0` bumps as `1_004_000`.

## Details

During the switch from `v0.9` to `v1.x`, the format of the
`spec_version` was modified from: `(M)m_ppp` for a runtime considered on
version `M.m.pp`. For instance `0.9.42` had a `spec_version` of `9420`.

With the transition to `v1.x`, the format was changed to a bigger number
(still `u32`) formatted as `MM_mm_ppp` where `1.2.3` would be stored as
`01_02_003`.

This PR aligns the format with that has been introduced in the
fellowship repo: `MMM_mmm_ppp`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Zombienet tests - disputes on finalized blocks (#2184)

**Overview:**
Adding an extra malus variant focusing on disputing finalized blocks. It
will:
- wrap around approval-voting
- listen to `OverseerSignal::BlockFinalized` and when encountered start
a dispute for the `dispute_offset`th ancestor
- simply pass through all other messages and signals

Add zombienet tests testing various edgecases:
- disputing freshly finalized blocks
- disputing stale finalized blocks
- disputing eagerly pruned finalized blocks (might be separate PR)

**TODO:**
- [x] Register new malus variant
- [x] Simple pass through wrapper (approval-voting)
- [x] Simple network definition
- [x] Listen to block finalizations
- [x] Fetch ancestor hash
- [x] Fetch session index
- [x] Fetch candidate
- [x] Construct and send dispute message
- [x] zndsl test 1 checking that disputes on fresh finalizations resolve
valid Closes #1365
- [x] zndsl test 2 checking that disputes for too old finalized blocks
are not possible Closes #1364
- [ ] zndsl test 3 checking that disputes for candidates with eagerly
pruned relay parent state are handled correctly #1359 (deferred to a
separate PR)
- [x] Unit tests for new malus variant (testing cli etc)
- [x] Clean/streamline error handling
- [ ] ~~Ensure it tests properly on session boundaries~~

---------

Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Decomissioned PR-Custom-Review (#2503)

This PR decomissions
[`PR-Custom-Review`](https://github.com/paritytech/pr-custom-review) in
replacement for
[`Review-bot`](https://github.com/paritytech/review-bot).

* Build the standard library crates when building the runtimes (#2217)

Our executor currently only supports the WASM MVP feature set, however
nowadays when compiling WASM the Rust compiler has more features enabled
by default.

We do set the `-C target-cpu=mvp` flag to make sure that *our* code gets
compiled in a way that is compatible with our executor, however this
doesn't affect Rust's standard library crates (`std`, `core` and
`alloc`) which are by default precompiled and still can make use of
these extra features.

So in this PR we force the compiler to also compile the standard library
crates for us to make sure that they also only use the MVP features.

I've added the `WASM_BUILD_STD` environment variable which can be used
to disable this behavior if set to `0`.

Unfortunately this *will* slow down the compile times when building
runtimes, but there isn't much that we can do about that.

Fixes https://github.com/paritytech/polkadot-sdk/issues/1755

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* asset-hub-westend-integration-tests: add more asset transfers tests (#2488)

Just adds more tests.

* Remove the timestamp handler (#2506)

* Staking: `chill_other` takes stash instead of controller (#2501)

The `chill_other` call is the only staking call that explicitly requires
`controller` in its signature. This PR changes the controller arg to be
the stash instead, with `StakingLedger` then fetching the controller
from storage.

This is not a breaking change per se - the call types do not change, but
is noteworthy as UIs will now want to pass the stash account into
`chill_other` calls, & metadata will reflect this.

Note: This is very low impact. `chill_other` has [hardly ever been
used](https://polkadot.subscan.io/extrinsic?address=&module=staking&call=chill_other&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=9431&endBlock=)
on Polkadot - notwithstanding the one called 11 days ago at block
18177457 that was a part of test I did, the last call was made 493 days
ago. Only 2 calls have ever been successful.

Addresses controller deprecation #2500

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* CI: Fix `build-and-attach-release-runtimes.yml` (#2471)

Incorporate suggestion from release team to get this workflow working.

edit: worked on this test GH release:
https://github.com/paritytech/polkadot-sdk/releases/tag/liam-debug-ghw.
let's try it.

* Fixes cumulus README instructions (#2442)

README instructions fixes to be compatible with the `polkadot-prepare`
and `polkadot-execute` binary split.

* Pools: Add ability to configure commission claiming permissions (#2474)

Addresses #409.

This request has been raised by multiple community members - the ability
for the nomination pool root role to configure permissionless commission
claiming:

> Would it be possible to have a claim_commission_other extrinsic for
claiming commission of nomination pools permissionless?

This PR does not quite introduce this additional call, but amends
`do_claim_commission` to check a new `claim_permission` field in the
`Commission` struct, configured by an enum:

```
enum CommissionClaimPermission {
   Permissionless,
   Account(AccountId),
}
```
This can be optionally set in a bonded pool's
`commission.claim_permission` field:

```
struct BondedPool {
   commission: {
      <snip>
      claim_permission: Option<CommissionClaimPermission<T::AccountId>>,
   },
   <snip>
}
```

This is a new field and requires a migration to add it to existing
pools. This will be `None` on pool creation, falling back to the `root`
role having sole access to claim commission if it is not set; this is
the behaviour as it is today. Once set, the field _can_ be set to `None`
again.

#### Changes
- [x] Add `commision.claim_permission` field.
- [x] Add `can_claim_commission` and amend `do_claim_commission`.
- [x] Add `set_commission_claim_permission` call.
- [x] Test to cover new configs and call.
- [x] Add and amend benchmarks.
- [x] Generate new weights + slot into call
`set_commission_claim_permission`.
- [x] Add migration to introduce `commission.claim_permission`, bump
storage version.
- [x] Update Westend weights.
- [x] Migration working.

---------

Co-authored-by: command-bot <>

* Added NetworkId::PolkadotBulletin variant (#2517)

We're going to bridge Polkadot Bridge Hub with [Polkadot Bulletin
chain](https://github.com/zdave-parity/polkadot-bulletin-chain) soon
(and Rococo Bridge Hub with 1:1 copy of Polkadot Bulletin chain even
sooner), so we need a variant for that chain in `NetworkId`. As
suggested, I'm adding a new variant for it to the `NetworkId` (we may
have used `ByGenesis(_)`, but decision was made to have a dedicated
variant for that).

* polkadot: disable block authoring backoff on production networks (#2510)

Currently the polkadot node will backoff from block authoring if
finality starts lagging. This PR disables this mechanism on production
networks (polkadot and kusama) and adds a flags to optionally force
enabling it.

* Set `frame_system::LastRuntimeUpgrade` after running `try-runtime` migrations (#2515)

Sets `frame_system::LastRuntimeUpgrade` after running try-runtime
migrations to better emulate real behavior.

This fixes an issue where migrations using the spec version to determine
whether to execute can incorrectly fail idempotency checks.

@s0me0ne-unkn0wn noticed this issue with the session key migration
introduced in https://github.com/paritytech/polkadot-sdk/pull/2265.

* Increase `cargo-check-each-crate-macos` timeout (#2519)

* Moves all test runtimes to use `derive_impl` (#2409)

Step in https://github.com/paritytech/polkadot-sdk/issues/171

This PR adds `derive_impl` on all `frame_system` config impls for mock
runtimes. The overridden configs are maintained as of now to ensure
minimal changes.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* PVF: Add test instructions (#2058)

* Remove `wasm-builder`'s README (#2525)

Followup of https://github.com/paritytech/polkadot-sdk/pull/2217

This PR deletes the README of the `wasm-builder` crate and moves its
docs back into the rustdoc, [as requested
here](https://github.com/paritytech/polkadot-sdk/pull/2217#discussion_r1406401175).
(:

* Remove `im-online` pallet from Rococo and Westend (#2265)

Co-authored-by: ordian <write@reusable.software>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>

* polkadot: remove grandpa pause support (#2511)

This was never used and we probably don't need it anyway.

* Remove pov-recovery race condition/Improve zombienet test (#2526)

The test was a bit flaky on CI. 

There was a race condition in the pov-recovery system. If the timing is
bad, it can happen that a block waits for a parent that is already
queued for import. The check if a block has children waiting happens
when we insert into the import queue. So we need to do an additional
check once we receive the import notification for the parent block.

Second issue is that `alice` was missing `--in-peers 0` and `--out-peers
0`, so alice was sometimes still fetching block via sync and the
assertion on the logs in zombienet would fail.

There is another potential issue that I saw once locally. We have a
failing pov-recovery queue that fails from time to time to check that
the retry mechanism does what it should. We now make sure that the same
candidate is never failed twice, so the tests become more predictable.

* Rework the event system of `sc-network` (#1370)

This commit introduces a new concept called `NotificationService` which
allows Polkadot protocols to communicate with the underlying
notification protocol implementation directly, without routing events
through `NetworkWorker`. This implies that each protocol has its own
service which it uses to communicate with remote peers and that each
`NotificationService` is unique with respect to the underlying
notification protocol, meaning `NotificationService` for the transaction
protocol can only be used to send and receive transaction-related
notifications.

The `NotificationService` concept introduces two additional benefits:
  * allow protocols to start using custom handshakes
  * allow protocols to accept/reject inbound peers

Previously the validation of inbound connections was solely the
responsibility of `ProtocolController`. This caused issues with light
peers and `SyncingEngine` as `ProtocolController` would accept more
peers than `SyncingEngine` could accept which caused peers to have
differing views of their own states. `SyncingEngine` would reject excess
peers but these rejections were not properly communicated to those peers
causing them to assume that they were accepted.

With `NotificationService`, the local handshake is not sent to remote
peer if peer is rejected which allows it to detect that it was rejected.

This commit also deprecates the use of `NetworkEventStream` for all
notification-related events and going forward only DHT events are
provided through `NetworkEventStream`. If protocols wish to follow each
other's events, they must introduce additional abtractions, as is done
for GRANDPA and transactions protocols by following the syncing protocol
through `SyncEventStream`.

Fixes https://github.com/paritytech/polkadot-sdk/issues/512
Fixes https://github.com/paritytech/polkadot-sdk/issues/514
Fixes https://github.com/paritytech/polkadot-sdk/issues/515
Fixes https://github.com/paritytech/polkadot-sdk/issues/554
Fixes https://github.com/paritytech/polkadot-sdk/issues/556

---
These changes are transferred from
https://github.com/paritytech/substrate/pull/14197 but there are no
functional changes compared to that PR

---------

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>

* [ci] Run gitspiegel trigger with merge conflicts (#2531)

Currently gitspiegel trigger won't run if there is merge conflict. This
PR fixes it.

close https://github.com/paritytech/gitspiegel/issues/183

* Remove long deprecated `AllPalletsWithoutSystemReversed` (#2509)

Remove deprecated `AllPalletsXY` types.

They have been deprecated for nearly 1.5 years now, I think its fine to
remove them.
If anyone feels like we should first put a date on the deprecation as
stated in the deprecation guideline, feel free to speak up. To me it
looks like this has been forgotten and can be directly removed.

* Remove `dmp_queue` pallet from Westend SP runtimes  (#2516)

Westend SP dmp queue pallet removal is complete.

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 27"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/906246fb-3de9-4133-a827-431636a097ad">

<img width="1499" alt="Screenshot 2023-11-28 at 08 32 08"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/bde84891-b044-42c7-9a0b-59125cd24db1">

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 45"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/38337484-0856-45c0-b9ff-8c785bc3c0e3">

* Enable parallel key scraping (#1985)

closes #174

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* substrate-node: `NativeElseWasmExecutor` is no longer used (#2521)

This PR removes `NativeElseWasmExecutor` usage from substrate node.
Instead [`WasmExecutor<(sp_io::SubstrateHostFunctions,
sp_statement_store::runtime_api::HostFunctions)>`](https://github.com/paritytech/polkadot-sdk/blob/49a41ab3bb3f630c20e5b24cec8d92382404631c/substrate/bin/node/executor/src/lib.rs#L26)
is used.

Related to #2358.

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Remove system parachains Polkadot and Kusama runtimes (#1737)

Since the Polkadot and Kusama runtimes are no longer in the repo, the
relevant systems parachains runtimes also need to be removed. More
context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).

Removes the following:
- `asset-hub-kusama` and `asset-hub-polkadot`
- `bridge-hub-kusama` and `bridge-hub-polkadot`
- `collectives-polkadot`
- `glutton-kusama`

Partially solves #603 and adds to #1731.

* Improve `CodeExecutor` (#2358)

Since `sp-state-machine` and `GenesisConfigBuilderRuntimeCaller` always
set `use_native` to be false.
We should remove this param and make `NativeElseWasmExecutor` behave
like its name.
It could make the above components use the correct execution strategy.

Maybe polkadot do not need about `NativeElseWasmExecutor` anymore. But
it is still needed by other chains and it's useful for debugging.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

* add Rotko common good parachain nodes (#2533)

rotko networks parachain bootnodes 
```
# array of commands for testing
parachains=(
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/33514/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/34514/ws/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/35514/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/33524/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/34524/ws/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/35524/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/33534/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/34534/ws/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/35534/wss/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/33543/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/34543/ws/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/35543/wss/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/33553/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/34553/ws/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/35553/wss/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/33563/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/34563/ws/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/35563/wss/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/33573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/34573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/35573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/33593/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/34593/ws/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/35593/wss/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
)
```

* Bump fs4 from 0.6.6 to 0.7.0 (#1844)

* ParachainHost: No need to be generic over the block or hash type (#2537)

The `BlockNumber` and `Hash` are fixed types any way.

* Adding LuckyFriday's Bootnodes per IBP Application (#2538)

Good day,

This PR requests the inclusion of two bootnode entries for Polkadot,
Kusama and Westend as part of LuckyFriday's IBP application. The nodes
are hosted on self-owned hardware in a co-located facility. We've
undertaken connectivity tests ourselves and also from members of the
IBP.

The test commands used are as follows:

```
polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30333/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30334/wss/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30333/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30333/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks
```

All tests yielded syncing with 1 peer, a positive result. We have also
backed up our node-key in the event that restoration is required.

I hope that the aforementioned meets the requirement for inclusion and
look forward to a speedy turnaround.

Kind Regards,
Will | Paradox

* sp-api: Sprinkle some `automatically_derived` attributes

This attribute is informing tooling that the code is automatically
derived and thus, should not enable any linting.

* Disable trace-level logging from the `test-linux-stable-int` (#2546)

* chainHead: Backport error codes from spec (#2539)

This PR backports the error codes from the spec.

This relies on two specs for defining the error codes:
- Our rpc-spec-v2 https://github.com/paritytech/json-rpc-interface-spec.
- JSON-RPC spec https://www.jsonrpc.org/specification#error_object.

To better describe the error codes, they are divided into two separate
modules `rpc_spec_v2` and `json_rpc_spec` respectively.

The `InvalidSubscriptionID` and `FetchBlockHeader` are merged into the
JSON-RPC spec `INTERNAL_ERROR`.
While the other error codes are adjusted from spec.

Errors that are currently in use:
- -32801 block hash not reported by chainHead_follow or block hash has
been unpinned
- -32802 chainHead_follow started with withRuntime == false
- -32803 chainHead_follow did not generate an
operationWaitingForContinue event

The following are errors defined in the [JSON-RPC
spec](https://www.jsonrpc.org/specification#error_object):
- -32602 The provided parameter isn't one of the expected values, has
different format or is missing
- -32603 Internal server error

Note: Error `-32801` must be introduced and generated by the outstanding
https://github.com/paritytech/polkadot-sdk/issues/1505

Closes: https://github.com/paritytech/polkadot-sdk/issues/2530

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* state-db: log_target usage fixed (#2547)

Use `LOG_TARGET/LOG_TARGET_PIN` in logs.

* Parachain Template: Prune `AuxStore` bound and corresponding crate dependency (#2303)

This small PR removes an unnecessary trait bound to the `AuxStore` trait
from the Parachain template's `rpc.rs` file.

With that bound removed, the entire dependency on `sc-client-api` can
also be removed.

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>
Co-authored-by: Bastian Köcher <git@kchr.de>

* Contracts: use compiled rust tests (#2347)

see #2189

This PR does the following:
- Bring the user api functions into a new pallet-contracts-uapi (They
are currently defined in ink!
[here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs)
- Add older api versions and unstable to the user api trait.
- Remove pallet-contracts-primitives and bring the types it defined in
uapi / pallet-contracts
- Add the infrastructure to build fixtures from Rust files and test it
works by replacing `dummy.wat` and `call.wat`
- Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.

This will be done in a follow up:
- convert the rest of the test from .wat to rust
- bring risc-v uapi up to date with wasm
- finalize the uapi host fns, making sure everything is codegen from the
source host fns in pallet-contracts

---------

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* upgraded review bot to 2.3.0 (#2549)

Upgraded to version 2.3.0 which includes:
- paritytech/review-bot#103
- paritytech/review-bot#102

* Register metrics for the notification handles (#2562)

Add metrics for notification handles so substream events are correctly
reported to Prometheus

* Introduce Polkadot-Sdk `developer_hub`  (#2102)

This PR introduces the new crate `developer_hub` into the polkadot-sdk
repo. The vision for the developer-hub crate is detailed in [this
document](https://docs.google.com/document/d/1XLLkFNE8v8HLvZpI2rzsa8N2IN1FcKntc8q-Sc4xBAk/edit?usp=sharing).

<img width="1128" alt="Screenshot 2023-11-02 at 10 45 48"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/1e12b60f-fef5-42c4-8503-a3ba234077c3">


Other than adding the new crate, it also does the following: 

* Remove the `substrate` crate, as there is now a unique umbrella crate
for multiple things in `developer_hub::polkadot_sdk`.
* (backport candidate) A minor change to `frame-support` macros that
allows `T::RuntimeOrigin` to also be acceptable as the origin type.
* (backport candidate) A minor change to `frame-system` that allows us
to deposit events at genesis because now the real genesis config is
generated via wasm, and we can safely assume `cfg!(feature = "std")`
means only testing. related to #62.
* (backport candidate) Introduces a small `read_events_for_pallet` to
`frame_system` for easier event reading in tests.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `pallet::call` docs.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `UncheckedExtrinsic` docs.

## Way Forward

First, a version of this is deployed temporarily
[here](https://blog.kianenigma.nl/polkadot-sdk/developer_hub/index.html).
I will keep it up to date on a daily basis.

### This Pull Request

I see two ways forward: 

1. We acknowledge that everything in `developer-hub` is going to be WIP,
and merge this asap. We should not yet use links to this crate anywhere.
2. We make this be the feature branch, make PRs against this, and either
gradually backport it, or only merge to master once it is done.

I am personally in favor of option 1. If we stick to option 2, we need a
better way to deploy a staging version of this to gh-pages.

### Issue Tracking

The main issues related to the future of `developer_hub` are: 

- https://github.com/paritytech/polkadot-sdk-docs/issues/31
- https://github.com/paritytech/polkadot-sdk-docs/issues/4
- https://github.com/paritytech/polkadot-sdk-docs/issues/26 
- https://github.com/paritytech/polkadot-sdk-docs/issues/32
- https://github.com/paritytech/polkadot-sdk-docs/issues/36


### After This Pull Request

- [ ] create a redirect for
https://paritytech.github.io/polkadot-sdk/master/substrate/
- [x] analy…
@bkchr
Copy link
Member Author

bkchr commented Feb 5, 2024

@michalkucharczyk could you give some short update on your status?

@michalkucharczyk
Copy link
Contributor

michalkucharczyk commented Feb 5, 2024

I am working (fork) on implementation of idea that was proposed in: https://hackmd.io/@_FY3-hvwQZ6cX_4n8zYUNA/HJqUWj4_s.

Current status is:

  • submitting transaction is working,
  • fork handling and finalization with views is implemented ,
  • tx events framework is working in general, however I expect some tweaks will be required,

Next steps are: implementation of revalidation, removing stale transactions from tx-pool and cleanup of the code.

@albertov19
Copy link

Hey @michalkucharczyk - Any updates? Thanks in advance

@michalkucharczyk
Copy link
Contributor

Hey @michalkucharczyk - Any updates? Thanks in advance

PR was opened #4639. I think core work is done, now polishing the code to get closer to production quality. There is a to-do list to allow progress tracking.

@NZT48
Copy link

NZT48 commented Aug 5, 2024

I would like to add on this issue that we experienced two issues on NeuroWeb that look related to this.

First issue is same as in issues that @brenzi mentioned (https://substrate.stackexchange.com/questions/11225/pending-extrinsics-jammed-how-to-ensure-re-broadcast). We saw on our Devnet (internal network), transactions were not reaching our collators, while they are in the non-collator nodes tx-pool. It can be seen below that all nodes except collators are having 600+ transactions in pool.
Screenshot 2024-08-05 at 11 49 42

What we understood is it that temporary solution for this is to have on collator restarted every 5 minutes by cron job. Until #4639 is merged and released.

Second issue, we are looking for some confirmation that is related to this one and help in resolving. After runtime upgrade where we changed dependencies from v0.9.40 to v1.9.0 (OriginTrail/neuroweb#86), upgrade was successful but after 30+ blocks, the chain could not produce a block. This happened on Rococo relay chain and NeuroWeb Testnet.

All collators have block 4238138 as their best block and 4238137 as finalized, but they are constantly trying to create 4238138 block again, and they are stuck in a loop. With following logs:

[Parachain] 💤 Idle (14 peers), best: #4238138 (0x186e…165a), finalized #4238137 (0xdf70…ce3d), ⬇ 0.3kiB/s ⬆ 0.8kiB/s
[Parachain] Report 12D3KooWKk4TataMLyBYkEGoZikga2xkQVvEfe6L3UFJvY2iS6ip: -2147483648 to -2147483648. Reason: Same block request multiple times. Banned, disconnecting.
[Relaychain] ✨ Imported #11627941 (0x7e09…08b4)
[Parachain] 🙌 Starting consensus session on top of parent 0xdf704d9ce889278706c9e695c587caa3dcef6633b576b189972c455796ecce3d
[Parachain] 🎁 Prepared block for proposing at 4238138 (351 ms) [hash: 0x1ed58716838be24bea68739874ff8d3fca16319b79f786a14ad53ffde002fc18; parent_hash: 0xdf70…ce3d; extrinsics (26): [0x236c…b58f, 0x46e3…fc58, 0x3a58…9c26, 0xf30d…8df3, 0xb9b3…03d6, 0xe8e6…ed9e, 0x4b0b…caa1, 0xd591…c703, 0xb6e8…0417, 0xa982…3a1f, 0xd151…18b7, 0x2423…1f0e, 0x9e72…2d6e, 0x3129…9dd8, 0xa7c0…9a04, 0xa622…7461, 0xec09…16b5, 0x2f71…e169, 0x4ed7…60f7, 0x678a…039d, 0x7f04…962a, 0x76d5…a05e, 0x8508…4fc0, 0xeb82…2628, 0xc50d…661c, 0x7a1a…af9d]
[Parachain] 🔖 Pre-sealed block for proposal at 4238138. Hash now 0xf9f612927c5910521e11d6effa144c12e2fce2a51ace33d021e6641a723f10d9, previously 
[Parachain] ✨ Imported #4238138 (0xf9f6…10d9)
[Parachain] PoV size { header: 1.0126953125kb, extrinsics: 19.8486328125kb, storage_proof: 534.142578125kb }
[Parachain] Compressed PoV size: 426.7099609375kb
[Relaychain] Trying to remove unknown reserved node 12D3KooWAV1uG1e8gH82RuhYjagTVpfu5aQJ3Vg4sXNFutRhY8o8 from SetId(3).
[Relaychain] Trying to remove unknown reserved node 12D3KooWM3hvXvaShyp7drQCavFHuwobkYdnCp2uHU5iRRAQwsw2 from SetId(3).
[Parachain] Report 12D3KooWQx3qkFdnyvqdg6dpyswAtVfnYTubWELRgcv72HF3978p: -2147483648 to -2147483648. Reason: Same block request multiple times. Banned, disconnecting.
[Parachain] Report 12D3KooWQy5GJRRRLdsiNryAAspbCfeH3resav7JV5gUUTyPfEPc: -2147483648 to -2147483648. Reason: Same block request multiple times. Banned, disconnecting.
[Parachain] Report 12D3KooWRWRmoWd7j5y91FbCkCjxvumicmpXsf5CCL5Zg8Fa1tVs: -2147483648 to -2147483648. Reason: Same block request multiple times. Banned, disconnecting.
[Relaychain] 💤 Idle (10 peers), best: #11627941 (0x7e09…08b4), finalized #11627939 

Our assumption is that it is caused by forks on relay chain (Rococo) which are not handled properly by collators on NeuroWeb Testnet. But we would like to get confirmation and better understanding of this issue, so we are sure how to avoid having it on NeuroWeb Mainnet, alongside finding the way to unblock NeuroWeb Testnet.

@skunert
Copy link
Contributor

skunert commented Aug 5, 2024

Hey @NZT48, thanks for the reports.

Second issue, we are looking for some confirmation that is related to this one and help in resolving. After runtime upgrade where we changed dependencies from v0.9.40 to v1.9.0 (OriginTrail/neuroweb#86), upgrade was successful but after 30+ blocks, the chain could not produce a block. This happened on Rococo relay chain and NeuroWeb Testnet.

This does not sound transaction pool related to me. Can I ask you to transfer this to a new issue? To get more detailed logs, please enable log level aura::cumulus=trace and post them there. I can then help you investigate this.

Regarding the txpool, @michalkucharczyk any ideas what can be done except regular restarts?

@michalkucharczyk
Copy link
Contributor

Regarding the txpool, @michalkucharczyk any ideas what can be done except regular restarts?

Not really. New pool already looks quite stable, I can offer assistance with testing new pool in your testnet.

@wilwade
Copy link
Contributor

wilwade commented Oct 12, 2024

@bkchr or others, would just switching from the RevalidationType.Full to RevalidationType.Light resolve the issue in the short term?

https://paritytech.github.io/polkadot-sdk/master/sc_transaction_pool/enum.RevalidationType.html#variant.Light

@bkchr
Copy link
Member Author

bkchr commented Oct 12, 2024

No sadly not. The pr should be merged in the near future and then should be ready to be tested. Best you already try the omni node if that works for you and if yes, you could start using it from master after it got merged.

@wilwade
Copy link
Contributor

wilwade commented Oct 12, 2024

OK. We're seeing this on mainnet so I think we are going to have to make a new pool with a custom strategy to work around it for now.

@bkchr
Copy link
Member Author

bkchr commented Oct 12, 2024

The issue is that the block production reports back "Invalid" transactions. The problem is not the revalidation. You can workaround this by providing a wrapped tx pool to your proposerfactory that doesn't forward report_invalid to the wrapped tx pool.

github-merge-queue bot pushed a commit that referenced this issue Oct 15, 2024
### Fork-Aware Transaction Pool Implementation

This PR introduces a fork-aware transaction pool (fatxpool) enhancing
transaction management by maintaining the valid state of txpool for
different forks.

### High-level overview
The high level overview was added to
[`sc_transaction_pool::fork_aware_txpool`](https://github.com/paritytech/polkadot-sdk/blob/3ad0a1b7c08e63a2581595cb2cd55f11ccd60f4f/substrate/client/transaction-pool/src/fork_aware_txpool/mod.rs#L21)
module. Use:
```
cargo  doc --document-private-items -p sc-transaction-pool --open
```
to build the doc. It should give a good overview and nice entry point
into the new pool's mechanics.

<details>
  <summary>Quick overview (documentation excerpt)</summary>

#### View
For every fork, a view is created. The view is a persisted state of the
transaction pool computed and updated at the tip of the fork. The view
is built around the existing `ValidatedPool` structure.

A view is created on every new best block notification. To create a
view, one of the existing views is chosen and cloned.

When the chain progresses, the view is kept in the cache
(`retracted_views`) to allow building blocks upon intermediary blocks in
the fork.

The views are deleted on finalization: views lower than the finalized
block are removed.

The views are updated with the transactions from the mempool—all
transactions are sent to the newly created views.
A maintain process is also executed for the newly created
views—basically resubmitting and pruning transactions from the
appropriate tree route.

##### View store
View store is the helper structure that acts as a container for all the
views. It provides some convenient methods.

##### Submitting transactions
Every transaction is submitted to every view at the tips of the forks.
Retracted views are not updated.
Every transaction also goes into the mempool.

##### Internal mempool
Shortly, the main purpose of an internal mempool is to prevent a
transaction from being lost. That could happen when a transaction is
invalid on one fork and could be valid on another. It also allows the
txpool to accept transactions when no blocks have been reported yet.

The mempool removes its transactions when they get finalized.
Transactions are also periodically verified on every finalized event and
removed from the mempool if no longer valid.

#### Events
Transaction events from multiple views are merged and filtered to avoid
duplicated events.
`Ready` / `Future` / `Inblock` events are originated in the Views and
are de-duplicated and forwarded to external listeners.
`Finalized` events are originated in fork-aware-txpool logic.
`Invalid` events requires special care and can be originated in both
view and fork-aware-txpool logic.

#### Light maintain
Sometime transaction pool does not have enough time to prepare fully
maintained view with all retracted transactions being revalidated. To
avoid providing empty ready transaction set to block builder (what would
result in empty block) the light maintain was implemented. It simply
removes the imported transactions from ready iterator.

#### Revalidation
Revalidation is performed for every view. The revalidation process is
started after a trigger is executed. The revalidation work is terminated
just after a new best block / finalized event is notified to the
transaction pool.
The revalidation result is applied to the newly created view which is
built upon the revalidated view.

Additionally, parts of the mempool are also revalidated to make sure
that no transactions are stuck in the mempool.


#### Logs
The most important log allowing to understand the state of the txpool
is:
```
              maintain: txs:(0, 92) views:[2;[(327, 76, 0), (326, 68, 0)]] event:Finalized { hash: 0x8...f, tree_route: [] }  took:3.463522ms
                             ^   ^         ^     ^   ^  ^      ^   ^  ^        ^                                                   ^
unwatched txs in mempool ────┘   │         │     │   │  │      │   │  │        │                                                   │
   watched txs in mempool ───────┘         │     │   │  │      │   │  │        │                                                   │
                     views  ───────────────┘     │   │  │      │   │  │        │                                                   │
                      1st view block # ──────────┘   │  │      │   │  │        │                                                   │
                           number of ready tx ───────┘  │      │   │  │        │                                                   │
                                numer of future tx ─────┘      │   │  │        │                                                   │
                                        2nd view block # ──────┘   │  │        │                                                   │
                                      number of ready tx ──────────┘  │        │                                                   │
                                           number of future tx ───────┘        │                                                   │
                                                                 event ────────┘                                                   │
                                                                       duration  ──────────────────────────────────────────────────┘
```
It is logged after the maintenance is done.

The `debug` level enables per-transaction logging, allowing to keep
track of all transaction-related actions that happened in txpool.
</details>


### Integration notes

For teams having a custom node, the new txpool needs to be instantiated,
typically in `service.rs` file, here is an example:

https://github.com/paritytech/polkadot-sdk/blob/9c547ff3e36cf3b52c99f4ed7849a8e9f722d97d/cumulus/polkadot-omni-node/lib/src/common/spec.rs#L152-L161

To enable new transaction pool the following cli arg shall be specified:
`--pool-type=fork-aware`. If it works, there shall be information
printed in the log:
```
2024-09-20 21:28:17.528  INFO main txpool: [Parachain]  creating ForkAware txpool.
````

For debugging the following debugs shall be enabled:
```
      "-lbasic-authorship=debug",
      "-ltxpool=debug",
```
*note:* trace for txpool enables per-transaction logging.

### Future work
The current implementation seems to be stable, however further
improvements are required.
Here is the umbrella issue for future work:
- #5472


Partially fixes: #1202

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Backlog to Completed in parachains team board Oct 15, 2024
@github-project-automation github-project-automation bot moved this from backlog to done in SDK Node Oct 15, 2024
@Polkadot-Forum
Copy link

This issue has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/the-fork-aware-transaction-pool/10468/1

@michalkucharczyk
Copy link
Contributor

Follow-up work planned here: #5472

bkchr added a commit to bkchr/frequency that referenced this issue Oct 24, 2024
This should be used as a workaround for: paritytech/polkadot-sdk#1202
@magecnion
Copy link

Hey @bkchr, we are considering adding the workaround you mentioned here. I want to keep in mind any possible side effects. The only one I can think of is the filling of the pool with invalid transactions. In this case, is there any way to clear it?

Am I missing any other potentially important effects?

@bkchr
Copy link
Member Author

bkchr commented Dec 10, 2024

@magecnion the tx pool transactions are constantly checked for validity. My workaround would lead to block production not being able to tell the pool that a tx is invalid. So, the pool would only find out about invalid transactions by re-checking their validity. (which by the way is the only way non validators find out about invalid tx in their pool)

@magecnion
Copy link

magecnion commented Dec 10, 2024

@bkchr I can see that invalid txs (with the InvalidTransaction::Future error) are not being removed, and they are included in the next block successfully. However, I noticed this log:

2024-12-10 16:02:36.083 TRACE tokio-runtime-worker txpool: [Parachain] [0x42ed3e14a19d91ba3485b1f8378e37ab0a5b1f8ae6de68f147f8d1ac9245ffb0] Skipped adding for revalidation: Already there.    

As you mentioned, txs are not being validated by block production but are being re-checked by another part of the code (I assume this is the revalidation part). However, this part is skipping the validation, as the log shows. I wonder if this can happen with txs that are invalid for a reason other than the InvalidTransaction::Future error, leading to the scenario I mentioned at the beginning: a pool full of invalid transactions.

EDIT: The previous reasoning was wrong; the skipping refers to the addition of the validation list, not the validation itself. But now I wonder if there is a chance that, in the revalidation process, the invalid transaction — which is now not removed because of the workaround — could be removed by the revalidation part.

@michalkucharczyk
Copy link
Contributor

michalkucharczyk commented Dec 10, 2024

@magecnion
I don't know what your environment is - but have you maybe tried a fork-aware transaction pool? It shall fix the problem with invalid transactions.

@magecnion
Copy link

magecnion commented Dec 11, 2024

@michalkucharczyk yes, actually, I've tried to include it in a forked sdk repo, but there are incompatibilities because of the version, I guess. We are using stable2407. So I have tried the mentioned workaround till the fork-aware is included in a stable version. Btw, I have updated my previous comment.

@bkchr
Copy link
Member Author

bkchr commented Dec 11, 2024

EDIT: The previous reasoning was wrong; the skipping refers to the addition of the validation list, not the validation itself. But now I wonder if there is a chance that, in the revalidation process, the invalid transaction — which is now not removed because of the workaround — could be removed by the revalidation part.

The workaround is not touching the revalidation worker. The workaround touches the interface between the block production and the tx pool. With the workaround applied, the block production is not reporting back to the tx pool invalid transaction. However, this does not touch the revalidation which will remove these invalid transactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request.
Projects
Status: done
Status: Completed
Development

Successfully merging a pull request may close this issue.