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
Branislav Kontur
3c4cce9eef
cargo machete removed unused deps (#1761 )
2024-04-10 10:28:37 +02:00
Serban Iorga
63a538a9bb
Deduplicate pallet call structs used for indirect runtime calls ( #1744 )
...
* Small changes
* Define generic bridge pallets call structs
* polkadot-core SignedExtension simplifications
- we don't seem to need to pass the Call as a generic param
- we can use codec(skip) instead of implementing Encode and Decode
* Split BridgeHubRococo and BridgeHubWococo calls
* code review fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f82372e818
Make debug display of LaneId compatible with its previous version ( #1740 )
...
* make {:?} of LaneId compatible with its previous version
* fmt
* apply review suggestions
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
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
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
66dfd2dcae
fix clippy ( #1698 )
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
9e92564c69
refund_pay_dispatch_fee removed ( #1695 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
9cea69349f
dry-run mode for init bridge command (#1690 )
...
* `dry-run` mode for init bridge command
* fix clippy
2024-04-10 10:28:37 +02:00
Branislav Kontur
02ef3a1a25
Added generic DispatchLevelResult to the MessageDispatchResult ( #1670 )
...
* Added generic DispatchLevelResult to the MessageDispatchResult
* Removed unnecessery `Clone + Decode + sp_std::fmt::Debug + Eq` + clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1688b493cd
Remove dispatch_result field ( #1660 )
...
* remove dispatch_result field
* fix benchmarks
2024-04-10 10:28:37 +02:00
Branislav Kontur
b3ab4a1b6a
Added event MessagesReceived for better visibility on receiving side ( #1655 )
...
* Added event `MessagesReceived` for better visibility on receiving side
* Fixes/comments from PR
* Final cleanup
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
e97bb57564
weights v1.5: iteration 2 ( #1613 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
829b23c7cf
Removed unused trait SenderOrigin ( #1611 )
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
9e1847d12a
Fix new nightly clippy issues ( #1604 )
...
* clipy
* revert some fixes that newest clippy reports as issues, but older does not
2024-04-10 10:28:37 +02:00
Branislav Kontur
87c3a57942
Removed unused AccountId from trait MessagesBridge ( #1600 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4f4200b0eb
Use proper account types ( #1591 )
...
* use proper account types
* Update primitives/messages/src/source_chain.rs
Co-authored-by: Branislav Kontur <bkontur@gmail.com >
Co-authored-by: Branislav Kontur <bkontur@gmail.com >
2024-04-10 10:28:37 +02:00
Branislav Kontur
75d61ff708
LaneMessageVerifier - removed unused Submitter ( #1589 )
...
* LaneMessageVerifier - removed unused Submitter
* fmt
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
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
Serban Iorga
1e0c2a6e02
Follow-up on #1487 ( #1511 )
...
* Remove unused trait implementations
Signed-off-by: Serban Iorga <serban@parity.io >
* Define encoded_size_hint_u32()
Signed-off-by: Serban Iorga <serban@parity.io >
* Define TransactionEstimationParams trait
Signed-off-by: Serban Iorga <serban@parity.io >
* Rework TransactionEstimation
Signed-off-by: Serban Iorga <serban@parity.io >
* Docs + Renamings
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ceefd1b05d
remove account derivation functions ( #1498 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7d97e576d0
Remove without_storage_info for messages pallet ( #1487 )
...
* draft: remove without_storage_info for messages pallet
* some cleanup
2024-04-10 10:28:37 +02:00
Serban Iorga
f8ff3c9142
Unify the operating mode for bridge pallets ( #1483 )
...
Unify the operating mode for bridge pallets
- define the OperationMode trait and BasicOperatingMode enum
- use the OperationMode trait in all the bridge pallets
- use BasicOperatingMode instead of IsHalted for the Grandpa pallet
- use BasicOperatingMode as part of MessagesOperatingMode
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
19c73ce0b7
Signed extension for rejecting obsolete messages pallet transactions ( #1446 )
...
* BridgeRejectObsoleteMessages
* add obsolete confirmations verification to the BridgeRejectObsoleteMessages
* move tests where they belong
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
631111ef7f
fix clippy errors ( #1447 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f0d05de080
Get dispatch weight from the target chain (when DispatchFeePayment::AtTargetChain is used) ( #1430 )
...
* reintroduce From<SourceChain>InboundLaneApi
* impl From<Chain>InboundLaneApi for testnet runtimes
* use inboundlaneapi in relay
* remove unused OutboundXcmWeigher
* spelling
* added the only test to messages pallet
* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7a92b40eab
Fix clippy warnings + try to enable proper (no-warning) clippy on CI ( #1410 )
...
* fix clippy warnings
* try to reenable proper clippy on CI
* fix clippy error
* more Eqs
* ignore clippy::derive-partial-eq-without-eq - clippy seems to be broken now :/
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
748c265c47
Xcm in Rialto<>Millau bridge ( #1379 )
...
* add XCM pallet to Millau runtime
* some progress
* messages are delivered (no fee)
* temp
* flush
* flush
* some progress
* progress
* Trap(42) is dispatched successfully
* fix spelling
* no more manual sending
* parametrize weight credit for tests
* actually charge fees
* enable send-using-messages-pallet to keep our test deployments alive + send valid XCM sometimes
* fix benchmarks build
* fix tests
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c538a39816
Switch to gav-xcm-v3 branch to be able to test bridges + XCMv3 integration ( #1378 )
...
* switch to gav-xcm-v3 branch (wip)
* add comment
* play with CI
* keep playing with CI
* play with CI
* trigger CI
* Revert "trigger CI"
This reverts commit fc35ac648fe6a3ea8e710a2e07dfee7d8762c6c4.
2024-04-10 10:28:37 +02:00
Adrian Catangiu
d04b018630
Few typos and clippy fixes ( #1362 )
...
* fix typos
* clippy fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
65c2c0ccce
Update Substrate/Polkadot/Cumulus references ( #1353 )
...
* cumulus: 4e95228291
polkadot: 975e780ae0d988dc033f400ba822d14b326ee5b9
substrate: 89fcb3e4f62d221d4e161a437768e77d6265889e
* fix refs
* sync changes from https://github.com/paritytech/polkadot/pull/3828
* sync changes from https://github.com/paritytech/polkadot/pull/4387
* sync changes from https://github.com/paritytech/polkadot/pull/3940
* sync with changes from https://github.com/paritytech/polkadot/pull/4493
* sync with changes from https://github.com/paritytech/polkadot/pull/4958
* sync with changes from https://github.com/paritytech/polkadot/pull/3889
* sync with changes from https://github.com/paritytech/polkadot/pull/5033
* sync with changes from https://github.com/paritytech/polkadot/pull/5065
* compilation fixes
* fixed prometheus endpoint startup (it now requires to be spawned within tokio context)
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ed2a3082ef
Support dedicated lanes for pallets ( #962 )
...
* pass call origin to the message verifier
* is_outbound_lane_enabled -> is_message_accepted
* trait SenderOrigin
* only accept messages from token swap pallet to token swap lane
* tests for edge cases of pay_delivery_and_dispatch_fee
* fixed origin verification
* fmt
* fix benchmarks compilation
* fix TODO with None account and non-zero message fee (already covered by tests)
* revert cargo fmt changes temporarily
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2bf5b23262
edition = "2021" ( #1346 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
25008a5166
when messages pallet is halted, relay shall not submit messages delivery/confirmation transactions ( #1289 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
22b1e456ab
move storage keys computation to primitivs ( #1254 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e23266c7e6
Bump dependencies ( #1180 )
...
* substrate: d0f6c1c60da22e04dd25c2eca46ebfe6f1571af0
polkadot: dd4b2e6a34a08a01b876d14641e99e7011be3463
cumulus: 9379cd6c18
* fmt
* fixed lost refs
* spelling
* benckhmarks
* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4b525f4fe1
Token swap pallet benchmarks ( #1174 )
...
* token swap benchmarks
* spellcheck
2024-04-10 10:28:37 +02:00
bear
f2092515a0
Move calculation relayer reward into MessageDeliveryAndDispatchPayment ( #1153 )
...
* Refactor logic
* Thanks svyatonik help, it compile
* Fix failed unit test
* Remove compile warning
* Rename
* Return result in pay_relayers_rewards
* Fix runtime compile issue
* Use MessageNonce
* Fix review issue
* Missing u64 replacement
* Revert return type changes
* Fix merge issue
* Remove useless clone
2024-04-10 10:28:37 +02:00
hacpy
bd70de8b8b
Match substrate's fmt ( #1148 )
...
* Alter gitlab.
* Use substrate's rustfmt.toml
* cargo +nightly fmt --all
* Fix spellcheck.
* cargo +nightly fmt --all
* format.
* Fix spellcheck and fmt
* fmt?
* Fix spellcheck
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
70f87e826c
Add rialto-parachain runtime and node ( #1142 )
...
* Substrate: 63b32fbaa2764c0a8ee76b70cdfa0fcb59b7181f
Polkadot: 7229ab87acf5bc5d4d10655ad1a9819a1e317442
Cumulus: d5284b0e78
* rialto parachain runtime
* fixed tests
* add node + bump refs (not compiling yet):
Substrate: 630422d6108cbaaca893ab213dde69f3bdaa1f6b
Polkadot: 7229ab87acf5bc5d4d10655ad1a9819a1e317442
Cumulus: 5af2990cfd
GrandpaBridgeGadget: c152c45ac331eb8ab40d956ab1d008d181810ef4
* fix compilation (collator is not working)
* more fixes
* fmt
* spellcheck
* fix warnings
* fix compilation
* fmt
* trigger CI
* trigger CI
* Revert "trigger CI"
This reverts commit a31f53cec47909817b31a48f3c9f1abd9321f72c.
* benchmarks
* fix benchmarks
* fix again
* Revert "Revert "trigger CI""
This reverts commit 1dea8b42ac8bca830dea982fd2613eb89d607a6c.
* Revert "Revert "Revert "trigger CI"""
This reverts commit 8fb74fa5eba483b7f6a3ce3e25a60757aef4c6bc.
* try fix
* lost lock file
* spellcheck
* try to disable sccache for cargo check
* Revert "Revert "Revert "Revert "trigger CI""""
This reverts commit f157461482d4c1d19156715c4b1ee2acb169531b.
* try to disable again
* disable sccache for test
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
eaf519dc1b
Rename MessageId -> BridgeMessageId ( #1152 )
2024-04-10 10:28:37 +02:00
bear
417903f9e7
Add OnMessageAccepted callback ( #1134 )
...
* Add `OnMessageAccepted` config type
* Update actual weight
* Add unit test
* Update weight
* Remove old comment & update wrong test data
* Make ci happy
* Add lane_id param
* update test case
* Make log info more readable
* Use saturating_sub
* Update docs
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
24bd2d6c51
Integrate token swap pallet into Millau runtime ( #1099 )
...
* integrate token swap pallet into Millau runtime
* set OnDeliveryConfirmed callback in Millau runtime
2024-04-10 10:28:37 +02:00
Xavier Lau
3d4d66456d
Code Cleaning ( #1124 )
...
* Remove Trailing Space
* Correct Source Chain Name
2024-04-10 10:28:37 +02:00