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
Serban Iorga
e0b42dfae7
Follow-up on #1518 ( #1546 )
...
* Adjustments for the xcm messages sending logic
Signed-off-by: Serban Iorga <serban@parity.io >
* Deduplicate XCM destination
Signed-off-by: Serban Iorga <serban@parity.io >
* [send_message] small changes
Signed-off-by: Serban Iorga <serban@parity.io >
* Define CustomNetworkId
Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;
We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.
Signed-off-by: Serban Iorga <serban@parity.io >
* Revert "Deduplicate XCM destination"
This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c131a5e3c8
Send messages using xcm pallet ( #1518 )
...
* send messages using xcm pallet
* XcmBridge && XcmBridgeAdapter + (untested) config in RialtoParachain
* impl encode_send_xcm for the rest
* remove duplicate code
* some fixes
* cleanup
* some more tests
* cleanup
* cleanup
* send Rialto -> Millau messages using bridge-messages pallet
* fmt
* some clippy fixes
* more clippy
2024-04-10 10:28:37 +02:00
Serban Iorga
5d9bd1d0b5
Reduce the number of macros used for SignedExtensions
...
Reduce the number of macros used for SignedExtensions
Signed-off-by: Serban Iorga <serban@parity.io >
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
ea1f46ff45
Add another condition to the reject-obsolete-parachain-heads extension ( #1505 )
...
* add another condition to the reject-obsolete-parachain-heads extension
* add tracing to obsolete-tx-extensions
* fix tests
* extension_rejects_header_from_new_relay_block_with_same_hash
* fmt
* fix benchmarks
2024-04-10 10:28:37 +02:00
Serban Iorga
e1fd877b80
CLI refactoring
...
* [CLI] Make bridge definitions more complete
* [CLI] Refactor relay_headers_and_messages
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
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
53780cfd1a
remove duplicate parachain heads exension ( #1444 )
...
* remove duplicate parachain heads exension
* fix benchmarks compilation
* actually fix it
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
b870fe74f8
Parachains pallet benchmarks ( #1436 )
...
* added parachains pallet benchmarks
* deduplicate insertion of bridged header
* pruning weight
* fixes
* fix compilation
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
5f2f61ced5
messages bridge between RialtoParachain and Millau ( #1218 )
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
d582061dff
Remove support for encoded-call messaging from relay and runtime integration code ( #1376 )
...
* remove support for encoded-call messaging
* continue cleanup
* continue cleanup
* continue cleanup
* more cleanpup
* more cleanup
* fmt
* continue cleanup
* spellcheck
* rename
* fix benchmarks
* mention encoded-calls-messaging tag
* fixing deployments
* fix messages generation
* fmt
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
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
814f23584c
use DecodeLimit when decoding incoming calls ( #1344 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
0ef401ae53
Revert "Revert "override conversion rate in estimate-message-fee RPC ( #1189 )" ( #1275 )" ( #1333 )
...
This reverts commit ffd25db46c5855bcef6710b53d5ca3325ce54e56.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
097a28418b
Add some tests to check integrity of chain constants + bridge configuration ( #1316 )
...
* add some tests to check integrity of chain constants + bridge configuration
* try to use named parameters where possible
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a39c567274
Endow relayer account at target chain in message benchmarks ( #1310 )
...
* endow relayer account at target chain in message benchmarks
* pick another line
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
43d2e4967b
fix benchmarks before using it in Polkadot/Kusama/Rococo runtimes ( #1309 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ea2d6f898d
Bump Substrate/Polkadot/Cumulus refs ( #1295 )
...
Substrate: 31d90c202d6df9ce3837ee55587b604619a912ba
Polkadot: 60df3c55c711c2872872d6220f98b2611340e051
Cumulus: a9630551c2
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
fd816b60e3
move "common" code of messages pallet benchmarks helpers to the common library ( #1281 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
eb5a3eecd2
Revert "override conversion rate in estimate-message-fee RPC ( #1189 )" ( #1275 )
...
This reverts commit ad4299f6c91ce4c50cb6fbc739a0c788e2920956.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
741484214e
override conversion rate in estimate-message-fee RPC ( #1189 )
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
bear
48121604cd
Expose some const value and type ( #1186 )
...
* change const value visable
* Add docs
* Update docs
* Update docs 2
* Fix ci
* Fix spell check
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
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
Tomasz Drwięga
eaf519dc1b
Rename MessageId -> BridgeMessageId ( #1152 )
2024-04-10 10:28:37 +02:00
Alfredo Garcia
6b3b6516e7
calculate fee using full message payload ( #1132 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
fc9363619a
[BREAKING] Migrate messages pallet to frame v2 ( #1088 )
...
* get rid of frame_support::traits::Instance usage in messaging
* migrate messages pallet to frame v2
* fix benchmarks
* remove dummy event + add Parameter to metadata
* review
* typo
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
239790fc72
Migrate dispatch pallet to frame v2 ( #1089 )
...
* pallet-bridge-dispatch -> frame v2
* fix metadata
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
9e0efdb7ac
extract message_details impl into runtime common ( #1070 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4e18bff37c
enable weight fee adjustent in Rialto/Millau ( #1044 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
165730a2c2
Rococo <> Wococo messages relay ( #1030 )
...
* MessagesInstance -> BridgedMessagesInstance
* Chain::ID -> Bridge::THIS_CHAIN_ID+Bridge::BRIDGED_CHAIN_ID
* FromBridgedChainEncodedMessageCall<B> -> FromBridgedChainEncodedMessageCall<DecodedCall>
* impl Parameter for ()
* copypaste storage_map_final_key to avoid different runtime references/dummy runtimes
* moved dummy runtime from primitives to relay client
* Rococo <> Wococo messages relays
* send R<>W messages using relay
* fmt
* return Result from get_dispatch_info
* fix benchmarks compilation
* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
20b7f341e1
pay dispatch fee at target chain ( #911 )
...
* pay dispatch fee at target chain
* refund unspent dispatch weight to messages relayer
* test that transfer actually happens
* pay-at-target-cchain benchmarks + fix previous benchmarks (invalid signature)
* include/exclude pay-dispatch-fee weight from delivery_and_dispatch_fee/delivery tx cost
* remvoe some redundant traces
* enum DispatchFeePayment {}
* typo
* update docs
* (revert removal of valid check)
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update modules/messages/src/benchmarking.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
0261d1e321
Fix clippy in test code ( #993 )
...
* fix clippy issues
* clippy + tests
* more clippy
Co-authored-by: adoerr <0xad@gmx.net >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ff7f8ad098
pass source and target chain ids to account_ownership_proof ( #963 )
2024-04-10 10:28:37 +02:00
fewensa
4ccf7a2f5a
Move pallet-bridge-dispatch types to primitives ( #948 )
...
* message dispatch support multiple instances
* Move pallet-bridge-dispatch types to primitives
* remove pallet-bridge-dispatch dependency
* Update cargo.lock (remove pallet-bridge-dispatch in substrate-relay)
* remove extra dependencies
2024-04-10 10:28:37 +02:00
fewensa
01cede2120
Message dispatch support multiple instances ( #942 )
...
* message dispatch support multiple instances
* format code
* define millau grandpa instance in rialto
2024-04-10 10:28:37 +02:00
Hernando Castano
982a50df66
Bump Substrate ( #939 )
...
* Bump Substrate to `0856e072`
* Fix compilation errors
2024-04-10 10:28:37 +02:00
Hernando Castano
c6ae74725b
Bump Substrate ( #871 )
...
* Bump Substrate
* Change usage of "Module" to "Pallet"
Related Substrate PR: https://github.com/paritytech/substrate/pull/8372
* Add `OnSetCode` config param
Related Substrate PR: https://github.com/paritytech/substrate/pull/8496
* Update Aura Slot duration time type
Related Substrate PR: https://github.com/paritytech/substrate/pull/8386
* Add `OnSetCode` to mock runtimes
* Add support for multiple justifications
Related Substrate PR: https://github.com/paritytech/substrate/pull/7640
* Use updated justification type in more places
* Make GenesisConfig type non-optional
Related Substrate PR: https://github.com/paritytech/substrate/pull/8275
* Update service to use updated telemetry
Related Substrate PR: https://github.com/paritytech/substrate/pull/8143
* Appease Clippy
2024-04-10 10:28:37 +02:00
Hernando Castano
21baffc832
Update Copyright Date to 2021 ( #864 )
...
* Update copyright date to 2021
* Bump date in license header template
2024-04-10 10:28:37 +02:00
Hernando Castano
8d122b03f1
Rename Finality Verifier and Call Dispatch Pallets ( #838 )
...
* Rename `pallet-finality-verifier` to `pallet-bridge-grandpa`
* Missed some CamelCase ones
* Update logging target in GRANDPA pallet
* Rename `pallet-bridge-call-dispatch` to `pallet-bridge-dispatch`
* Rename the dispatch pallet folder
* Update logging target in Dispatch pallet
* Missed a couple
* Format the repo
* Stop listing individual pallets in Compose logs
* Use correct pallet name in module doc comments
* Add `pallet-bridge-dispatch` to README project layout
* Sort crate names in TOML files
* Rename `pallet-bridge-grandpa` runtime Call alias
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4105575794
Rename pallet-message-lane into pallet-bridge-messages ( #834 )
...
* use runtime:: prefix for message-lane pallet traces
* renamed message-lane (module and primitives) folder into messages
* replace "message lane" with "messages" where appropriate
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
401d3847d1
Add multiplier parameter to transaction_payment function ( #830 )
...
* transaction_payment_without_multiplier -> transaction_payment
* tests
* fmt
2024-04-10 10:28:37 +02:00