Svyatoslav Nikolsky
b03c584e31
Add millau specific messages weights ( #2097 )
...
* refactor weights a bit
* post cherry-pick fixes
* do not run spellcheck on new weight files
* fix
2024-04-10 10:28:37 +02:00
dependabot[bot]
cffc8e3a7b
Bump scale-info from 2.5.0 to 2.6.0
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/commits )
---
updated-dependencies:
- dependency-name: scale-info
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c17f625770
Add more logs to relayer and message pallets ( #2082 )
...
* add more logs
* unused import
* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1f738f1389
Benchmarks for new relayers pallet calls ( #2040 )
...
* slash relayer balance for invalid transactions
* require some gap before unstake is possible
* more clippy
* log priority boost
* add issue ref to TODO
* fix typo
* is_message_delivery_call -> is_receive_messages_proof_call
* moved is_receive_messages_proof_call above
* only slash relayers for priority transactions
* benchmarks for new relayers pallet calls
* generated weights
* regenerated weights afer master merge
* actually use weights
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
53e1b7e264
Slash relayers for invalid transactions ( #2025 )
...
* slash relayer balance for invalid transactions
* require some gap before unstake is possible
* more clippy
* log priority boost
* add issue ref to TODO
* fix typo
* is_message_delivery_call -> is_receive_messages_proof_call
* moved is_receive_messages_proof_call above
* only slash relayers for priority transactions
* Update primitives/relayers/src/registration.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update primitives/relayers/src/registration.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update modules/relayers/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update primitives/relayers/src/registration.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* benificiary -> beneficiary
---------
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
9e48162df2
refund extra weight in receive_messages_delivery_proof call ( #2031 )
2024-04-10 10:28:37 +02:00
dependabot[bot]
1659b4b447
Bump scale-info from 2.4.0 to 2.5.0
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/compare/v2.4.0...v2.5.0 )
---
updated-dependencies:
- dependency-name: scale-info
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
068f6f648b
Run benchmarks for mock runtimes ( #1996 )
...
* run benchmarks for pallet-bridge-grandpa mock runtime
* run benchmarks for pallet-bridge-relayers mock runtime
* run benchmarks for pallet-bridge-parachains mock runtime
* run benchmarks for pallet-bridge-messages mock runtime
* test benchmarks on mockj runtimes from CI
* clippy and spelling
2024-04-10 10:28:37 +02:00
Adrian Catangiu
e55d4dd6e0
bump substrate+polkadot refs and fix builds ( #1989 )
...
* bump refs and fix build
* more fixes
* Fix rialto-parachain node
* Update dependencies for tools/runtime-codegen
* Regenerate rialto-parachain indirect runtime
* Fix register_parachain
* Fix clippy
* Undo clippy allow
---------
Co-authored-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Branislav Kontur
ce89a2edca
Removed deprecated #[pallet::generate_store(pub(super) trait Store)] according to latest Cumulus ( #1964 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3a145e5844
get rid of obsolete weight functions ( #1926 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
aa466a485d
Fix benchmarks ( #1919 )
...
* fixed benchmarks broken by rejecting storage proofs with excessive trie nodes and justifications with extra prevotes
* update weights
* fmt
* accidental paste
* revert changes to millau runtime (separate PR)
* revert comment change
2024-04-10 10:28:37 +02:00
Serban Iorga
ba155f990f
Refund messages confirmation tx ( #1904 )
...
* Refund messages confirmation tx
* Fixes
2024-04-10 10:28:37 +02:00
Serban Iorga
f5fee288b9
Relayers pallet: extend payment source id ( #1907 )
...
* Add Chain::ID const
* Relayers pallet: extend payment source id
* Addressed code review comments
* Fix benchmarks
* Fix dashboards
* Renamings
* Fix compilation
2024-04-10 10:28:37 +02:00
Branislav Kontur
6a2ef74707
Make weights::WeightInfo pub ( #1886 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a091b8405e
Update Substrate/Polkadot/Cumulus dependencies + weights v2 ( #1850 )
...
* cargo update
* weights v2
* clippy
* no spellcheck for weights.rs
* fix proof_size component in MAXIMUM_BLOCK_WEIGHT constants
* "fix" proof_size in select_delivery_transaction_limits_works
* spellcheck
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ec9cd8ddb0
Remove chain-specific dependencies from crates that will be used in Cumulus ( #1783 )
...
* leave-modules.sh
* remove bp-rialto dependency from bp-relayers
* update leave-modules.sh
* fix Cargo.toml of pallet-bridge-relayers
* update leave-modules.sh
* remove bp-rialto and millau-runtime frombridge-runtime-common Cargo.toml
* update leave-modules.sh
* remove chain dependencies from bridge-runtime-common crate
* fix tests
* cleanup script
* rename script
* kind of success message
* remove leave-modules.sh
* use TargetHeaderChainAdapter and SourceHeaderChainAdapter in our testnets
* update script
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4cdb85247e
add try-runtime feature to pallets ( #1779 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d7b131646c
Relayer reward metric ( #1742 )
...
* use StorageDoubleMapKeyProvider in RelayerRewards
* add metrics
* clippy
* fixed alerts that have caused missing dashboards
* fix metric name
* fix metric name again
* add new metrics to the RialtoParachain <> Millau maintenance dashboard
* remove obsolete dashboard
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
b06cd924e9
Crate-level documentation on finality relays and relayers pallet ( #1773 )
...
* started crate-level documentation on relays and relayers pallet
* fixes in finality and parachain finality relay docs
* fix links
* grammar fixes
2024-04-10 10:28:37 +02:00
Branislav Kontur
5fdc89d651
Bump xcm-v3 + substrate ( #1767 )
...
* Bump xcm-v3 + substrate
* More fixes
* Added `#[pallet::call_index`
* Fixes for MMR (TODO:plese check)
* More call indexes
* Cumulus bump
* Fixes for mmr
* Fixes for weights
* Fixes for xcm
* MMR fixes + cargo fmt
* Fix some rpc errors (bump jsonrpsee version)
* Fix cumulus stuff
* Fixes cumulus
* clippy
* more clipy
* Fix test + unused deps
* PR fixes
* cargo update (bump xcm-v3)
Co-authored-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
03425b33ae
Use TypedLaneId instead of LaneId ( #1738 )
...
* TypedLaneId -> LaneId
* fix benchmarks compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
df1aed01c4
Updated db weights and some experiments ( #1732 )
...
* updated weights
* also fix off-by-one in benchmarks
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2c5e2f09eb
New relayer rewards scheme integration ( #1652 )
...
* relayer rewards integration: initial commit
* added refund-relayer-extension to the millau runtime
* spelling
* spelling again
* new -> Default
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
161d861d9b
Signed extension to refund relayer at the target chain ( #1657 )
...
* add utlity pallet to the Millau runtime
* RefundRelayerForMessagesDeliveryFromParachain prototype
* done with RefundRelayerForMessagesDeliveryFromParachain::post_dispatch
* parse calls
* check batch for obsolete headers/messages
* fmt
* shorten generic arg names + add parachain id generic arg
* check lane_id
* impl all state read functions
* fix typos from review
* renamed extension + reference issue from TODO
* tests for pre-dispaytch
* renamed extension source file
* tests for post-dispatch
* abstract fee calculation
* clippy
* actually fix clippy
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
aeeb53343e
DeliveryConfirmationPayments trait for paying relayer rewards at the source chain ( #1653 )
...
* DeliveryConfirmationPayments
* ref proper PR in TODO
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
b94bd8d46b
fixed benchmarks of relayers pallet ( #1700 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3eb24d4515
removed MintReward and added PayLaneRewardFromAccount ( #1693 )
...
* removed MintReward and added PayLaneRewardFromAccount
* clippy
* added issue ref to TODO
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ea98118031
Per-lane rewards in pallet-bridge-relayers ( #1665 )
...
* per-lane rewards in pallet-bridge-relayers
* add lane id to RewardPaid event
* clippy
* fix benchmarks
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
eabfea6229
Prune messages from on-idle callback ( #1650 )
...
* prune messages from on-idle callback
* no more secondary lanes at deployments
* clippy
* Update modules/messages/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* sub -> add
* more tests + check that message is sent using one of ActiveOutboundLanes
* ensure spent_weight is correct
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
8e660dd74e
Remove callbacks from the messages pallet ( #1649 )
...
* remove callbacks
* clippy
* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
8c845602cf
Remove message fee + message send calls ( #1642 )
...
* remove message fee
* it is compiling!
* fixes + fmt
* more cleanup
* more cleanup
* restore MessageDeliveryAndDispatchPayment since we'll need relayer rewards
* started rational relayer removal
* more removal
* removed estimate fee subcommand
* remove DispatchFeePayment
* more removals
* removed conversion rates && some metrics
* - unneeded associated type
* - OutboundMessageFee
* fix benchmarks compilation
* fmt
* test + fix benchmarks
* fix send message
* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a3dc2d2748
Bump Substrate/Polkadot/Cumulus refs (aka Weights v1.5) ( #1597 )
...
* update Substrate + Polkadot + Cumulus refs
* Origin -> RuntimeOrigin
* weights v1.5
* update refs once again + `cargo test -p pallet-bridge-grandpa` works
* started work on `cargo test -p pallet-bridge-messages`
* cargo test -p pallet-bridge-relayers
* cargo test -p pallet-bridge-parachains
* cargo test -p millau-runtime
* cargo test -p bridge-runtime-common
* cargo test -p rialto-runtime
* cargo test -p rialto-parachain-runtime
* cargo test -p millau-bridge-node
* cargo test -p rialto-bridge-node
* cargo test -p rialto-parachain-collator
* cargo test -p messages-relay
* cargo test -p parachains-relay
* cargo test -p substrate-relay
* cargo test --all
* cargo check -p millau-runtime --locked --features runtime-benchmarks
* fix remaining test
* fmt
* try to allow clippy failure temporarily
* Revert "try to allow clippy failure temporarily"
This reverts commit d1b6593580f07e0dbeecb7ab0aa92cee98888ed3.
* use min_by
* Revert "use min_by"
This reverts commit 33042f49ed37e8dd0505370289e17f03bf1a56ee.
* Revert "Revert "use min_by""
This reverts commit 1d2204f0b14dc81e5650bb574dedb5fa78c7097d.
* trigger CI
* Revert "trigger CI"
This reverts commit 259d91b5606743bba9d043c69f07eac6c8700ef5.
* new day, new clippy warning
* more clippy issues
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
6f9bda5db0
MillauWeight -> BridgeWeight ( #1593 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
d64815cdef
Cleaning deps + satisfy `cargo build --release --all-targets --all-fe… ( #1587 )
...
* Cleaning deps + satisfy `cargo build --release --all-targets --all-features`
* PR fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
95c30c780c
update Substrate/Polkadot/Cumulus refs ( #1562 )
...
* update Substrate/Polkadot/Cumulus refs
* finality-grandpa 0.16
* fix miillau-runtime compilation
* fix rialto runtime compilation
* fixed rialto-parachain runtime compilation
* backport GRANDPA test fixes
* helper instead of removed record_all_keys
* substrate-relay is compiling
* millau-bridge-node at least compiles
* rialto-bridge-node at least compiles
* rialto-parachain-collator compiles
* fixings tests (wip)
* fmt
* fixed BEEFY alert
* clippy
* removed unused dep
* -extra var
* move Leaf to mod mmr
* fix benchmarks
2024-04-10 10:28:37 +02:00
Branislav Kontur
7ad5b0fe56
Bump codec version 3.0.0 -> 3.1.5 + unify parity-scale-codec vs codec ( #1552 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
260dad5110
Bko cosmetics ( #1550 )
...
* Bump log version to 0.4.17
* Removed unnecesseray dependency + rename BridgeGrandpaMillauCall to BridgeGrandpaCall
2024-04-10 10:28:37 +02:00
Serban Iorga
5cc874e7b8
relayers pallet - small changes ( #1547 )
...
Signed-off-by: Serban Iorga <serban@parity.io >
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7590abd1a3
Introduce bridge relayers pallet ( #1513 )
...
* introduce relayers pallet
* add MessageDeliveryAndDispatchPaymentAdapter
* plug in pallet into test runtimes
* tests prototype
* tests for the relayers pallet
* tests for payment adapter
* mint_reward_payment_procedure_actually_mints_tokens
* benchmarks
* remove irrelevant todo
* remove redundant clone
2024-04-10 10:28:37 +02:00
Serban Iorga
9a3e2c8c5a
Remove bridges subtree
2024-04-10 10:28:37 +02:00
Serban Iorga
d5617cf3cd
Update bridges subtree ( #3938 )
...
Pulling the latest changes from `parity-bridges-common`
2024-04-02 12:25:56 +00:00
Serban Iorga
b839c995c0
Update bridges subtree ( #3841 )
...
Updating the bridges subtree hopefully just one last time in this
formula in order to make the final migration less verbose.
2024-03-26 13:09:11 +00:00
gupnik
7099f6e1b1
Removes as [disambiguation_path] from derive_impl usage ( #3652 )
...
Step in https://github.com/paritytech/polkadot-sdk/issues/171
This PR removes `as [disambiguation_path]` syntax from `derive_impl`
usage across the polkadot-sdk as introduced in
https://github.com/paritytech/polkadot-sdk/pull/3505
2024-03-15 07:46:09 +00:00
Oliver Tale-Yazdi
e80c24733f
Lift dependencies to the workspace (Part 1) ( #2070 )
...
Changes (partial https://github.com/paritytech/polkadot-sdk/issues/994 ):
- Set log to `0.4.20` everywhere
- Lift `log` to the workspace
Starting with a simpler one after seeing
https://github.com/paritytech/polkadot-sdk/pull/2065 from @jsdw.
This sets the `default-features` to `false` in the root and then
overwrites that in each create to its original value. This is necessary
since otherwise the `default` features are additive and its impossible
to disable them in the crate again once they are enabled in the
workspace.
I am using a tool to do this, so its mostly a test to see that it works
as expected.
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2024-02-12 11:19:20 +00:00
Liam Aharon
3717ec3802
Sync Cargo.toml and crates.io versions ( #3034 )
...
Related https://github.com/paritytech/polkadot-sdk/issues/3032
---
Using https://github.com/liamaharon/cargo-workspace-version-tools/
`cargo run -- sync --path ../polkadot-sdk`
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2024-01-26 18:14:03 +00:00
Dónal Murray
d68868f64a
Fix clippy lints behind feature gates and add new CI step all features ( #2569 )
...
Many clippy lints usually enforced by `-Dcomplexity` and `-Dcorrectness`
are not caught by CI as they are gated by `features`, like
`runtime-benchmarks`, while the clippy CI job runs with only the default
features for all targets.
This PR also adds a CI step to run clippy with `--all-features` to
ensure the code quality is maintained behind feature gates from now on.
To improve local development, clippy lints are downgraded to warnings,
but they still will result in an error at CI due to the `-Dwarnings`
rustflag.
---------
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
2023-12-20 16:30:10 +00:00
Squirrel
be8e626806
Set clippy lints in workspace (requires rust 1.74) ( #2390 )
...
We currently use a bit of a hack in `.cargo/config` to make sure that
clippy isn't too annoying by specifying the list of lints.
There is now a stable way to define lints for a workspace. The only down
side is that every crate seems to have to opt into this so there's a
*few* files modified in this PR.
Dependencies:
- [x] PR that upgrades CI to use rust 1.74 is merged.
---------
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
Co-authored-by: Branislav Kontur <bkontur@gmail.com >
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
2023-12-13 15:11:07 +01:00
Liam Aharon
4a293bc5a2
Enforce consistent and correct toml formatting ( #2518 )
...
Using taplo, fixes all our broken and inconsistent toml formatting and
adds CI to keep them tidy.
If people want we can customise the format rules as described here
https://taplo.tamasfe.dev/configuration/formatter-options.html
@ggwpez, I suggest zepter is used only for checking features are
propagated, and leave formatting for taplo to avoid duplicate work and
conflicts.
TODO
- [x] Use `exclude = [...]` syntax in taplo file to ignore zombienet
tests instead of deleting the dir
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-12-01 07:38:02 +00:00
Branislav Kontur
f4bb17cc86
[testnet] Remove Wococo stuff from BridgeHubRococo/AssetHubRococo ( #2300 )
...
Rococo<>Wococo bridge is replaced by Rococo<Westend bridge, so this PR
removes unneeded code.
- [x] update bridges subtree after
https://github.com/paritytech/parity-bridges-common/pull/2692
---------
Co-authored-by: command-bot <>
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
2023-11-15 17:40:07 +02:00