Skip to content

[bridges] Prune messages from confirmation tx body, not from the on_idle#5006

Merged
acatangiu merged 70 commits intomasterfrom
bko-bridges-v2-backport-pruning
Aug 23, 2024
Merged

[bridges] Prune messages from confirmation tx body, not from the on_idle#5006
acatangiu merged 70 commits intomasterfrom
bko-bridges-v2-backport-pruning

Conversation

@bkontur
Copy link
Copy Markdown
Contributor

@bkontur bkontur commented Jul 11, 2024

(Please, do not merge until SA, reverted and restored of #4944)

Original PR with more context: paritytech/parity-bridges-common#2211
Relates to: paritytech/parity-bridges-common#2210

TODO

  • fresh weighs for pallet_bridge_messages
  • add try_state for pallet_bridge_messages which checks for unpruned messages - relates to the comment
  • prepare migration, that prunes leftovers, which would be pruned eventually from on_idle the comment can be done also by set_storage / kill_storage or with OnRuntimeUpgrade implementatino when do_try_state_for_outbound_lanes detects problem.

Open question

serban300 and others added 30 commits June 26, 2024 21:08
* Define Chain::STATE_VERSION

* Add vec_db module

* Use VecDb instead of StorageProof for message delivery

* Make sure that the TrustedVecDb is sorted

* Address review comments

* Run benchmarks on parent commit

* Run benchmarks with new code

* Fix test

* Fix code review comments
* moved FromBridgedChainMessagesDeliveryProof to bp-messages

* spelling

* fix benchmarks compilation
* moved FromBridgedChainMessagesProof to bp-messages

* fmt
* moved message files to separate folder

* ...and fix paths in code

* fmt

rebase nit
* Adjust messages pallet benchmarks

* Address comment
* moved files around

* and fix compilation

Move Chain::ID from relay-level Chain to primitives-level Chain (#2181)

* move Chain::ID from relay-level Chain to primitives-level Chain

* removed chain IDs from bp-runtime

* add missing file header

Adjust weights (#2185)

fix clippy (#2186)

Remove source header chain (#2183)

* moved messages proof verification to messages pallet

* removed SourceHeaderChain

* cleanup

* benchmarks compilation

* fix benchmark tests compilation

* clippy

* fmt

Use compact proofs for messages delivery confirmation (#2187)

* Use compact proofs for messages delivery confirmation

* Fix benchmarks

Move messages delivery proof verification to pallet (#2189)

* rename messages_proof.rs to proofs.rs

* moved delivery proof verification to the messages pallet

* removed TargetHeaderChain

* cleaning up

* fixed benchmarks compilation

* Update modules/messages/README.md

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

* uncommented test and removed printlns

* vec![].into_iter().collect() -> vec![].into()

---------

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

removed MaxUnrewardedRelayerEntriesAtInboundLane and MaxUnconfirmedMessagesAtInboundLane from messages pallet config (#2190)

* removed MaxUnrewardedRelayerEntriesAtInboundLane and MaxUnconfirmedMessagesAtInboundLane from messages pallet config

* fixed doc

* fixed benchmarking code

* more fixes

remove MaximalOutboundPayloadSize and use BridgedChain::maximal_incomging_message_size instead (#2191)

remove MessageBridge trait (#2192)
* Use compact proofs for parachains

* Remove StorageProofChecker

* Cleanup

Reuse messages proof generation from messages pallet (#2195)

* reuse messages proof generation from messages pallet

* incorrect merge

fixed remaining TODOs after messages pallet Config refactoring (#2196)

Return UntrustedVecDb from prove_storage() (#2197)

Storage proofs related renamings (#2198)

* Storage proofs related renamings

* Leftovers

* StorageSize -> StorageProofSize
* add test for maximal message dispatch weight

* fixed weight computations - use kb for both size-related benchmarks

* fix typo in weight formula

* decreased maximal message size to 64Kb
* Box messages proof argument in receive_messages_proof call

* fix benchmark tests
* StorageProofSize -> StorageSize

* Rename benchmarks

* StorageSize -> UnverifiedStorageProofParams

* Fix clippy

* Fix priority boost
* update async-trait to 0.1.69

* more clippy fixes
* some code grooming: enable warn(missing_docs) for all piblic crates + added missing documentation + removed obsolete clippy/deny workarounds

* removed strange allow + added comment related to other allow

* removed incorrect_clone_impl_on_copy_type which is unknown to CI clippy
…=bridge-hub-rococo --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_grandpa

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-rococo --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_relayers

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-westend --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_relayers

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-westend --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_parachains

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-rococo --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_parachains

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-westend --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_grandpa

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-westend --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_messages

".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-rococo --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_messages
…=bridge-hub-westend --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_grandpa
@bkontur bkontur added the T15-bridges This PR/Issue is related to bridges. label Jul 11, 2024
Base automatically changed from revert-4944-bko-bridges-v2-backport-pruning to bko-bridges-v2-backport-refactoring July 11, 2024 14:08
@bkontur bkontur marked this pull request as ready for review July 11, 2024 14:08
@paritytech-review-bot paritytech-review-bot bot requested a review from a team July 11, 2024 14:09
@bkontur bkontur force-pushed the bko-bridges-v2-backport-pruning branch from fb8d0ba to a14c7c9 Compare July 11, 2024 14:10
bkontur and others added 5 commits July 11, 2024 16:11
Original PR with more context: paritytech/parity-bridges-common#2211


Signed-off-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
…=bridge-hub-westend --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_messages
…=bridge-hub-rococo --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_bridge_messages
@paritytech-cicd-pr
Copy link
Copy Markdown

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: check-core-crypto-features
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6677710

@bkontur bkontur force-pushed the bko-bridges-v2-backport-pruning branch from a14c7c9 to 59003a5 Compare July 11, 2024 14:11
@bkontur bkontur added the R0-no-crate-publish-required The change does not require any crates to be re-published. label Jul 11, 2024
Base automatically changed from bko-bridges-v2-backport-refactoring to master July 12, 2024 08:48
@bkontur bkontur self-assigned this Jul 16, 2024
@acatangiu
Copy link
Copy Markdown
Contributor

Please, do not merge until SA

@bkontur What is SA? 🙈
What is blocking this?

@serban300
Copy link
Copy Markdown
Contributor

@bkontur What is SA? 🙈

Security Audit maybe ?

@acatangiu acatangiu added this pull request to the merge queue Aug 23, 2024
Merged via the queue into master with commit e4ffba6 Aug 23, 2024
@acatangiu acatangiu deleted the bko-bridges-v2-backport-pruning branch August 23, 2024 12:52
ordian added a commit that referenced this pull request Aug 27, 2024
* master: (36 commits)
  Bump the ci_dependencies group across 1 directory with 2 updates (#5401)
  Remove deprecated calls in cumulus-parachain-system (#5439)
  Make the PR template a default for new PRs (#5462)
  Only log the propagating transactions when they are not empty (#5424)
  [CI] Fix SemVer check base commit (#5361)
  Sync status refactoring (#5450)
  Add build options to the srtool build step (#4956)
  `MaybeConsideration` extension trait for `Consideration` (#5384)
  Skip slot before creating inherent data providers during major sync (#5344)
  Add symlinks for code of conduct and contribution guidelines (#5447)
  pallet-collator-selection: correctly register weight in `new_session` (#5430)
  Derive `Clone` on `EncodableOpaqueLeaf` (#5442)
  Moving `Find FAIL-CI` check to GHA (#5377)
  Remove panic, as proof is invalid. (#5427)
  Reactive syncing metrics (#5410)
  [bridges] Prune messages from confirmation tx body, not from the on_idle (#5006)
  Change the chain to Rococo in the parachain template Zombienet config (#5279)
  Improve the appearance of crates on `crates.io` (#5243)
  Add initial version of `pallet_revive` (#5293)
  Update OpenZeppelin template documentation (#5398)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published. T15-bridges This PR/Issue is related to bridges.

Projects

Status: Done
Status: Audited
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants