Svyatoslav Nikolsky
1d99ad3619
replace latest_confirmed_nonce runtime APIs with direct storage reads ( #1282 )
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
00f68e7722
Move benchmarks from Rialto to Millau ( #1277 )
...
* move brnchmarks from Rialto to Millau
* fix limits test
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
a88207876c
Replace InboundLaneApi::latest_received_nonce with direct storage read ( #1269 )
...
* remove inbound_latest_received_nonce
* Update relays/lib-substrate-relay/src/messages_target.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
988f6b1664
remove OutboundLaneApi::latest_received_nonce ( #1262 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c21217a282
read latest_generated_nonce directly from storage ( #1260 )
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
Adrian Catangiu
8edc9038d1
runtimes: fix call_size() test ( #1245 )
...
Signed-off-by: acatangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4cdd959057
Refactor message relay helpers ( #1234 )
...
* refactor message relay helpers
* single standalone_metrics function
* fixed tests
* clippy + fmt
* removed commented code
* add calls tracing
* fix spelling
* cargo fmt
* -commented code
* fix build again
* post-merge build fix
* clippy + fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e675b13042
Refactor finality relay helpers ( #1220 )
...
* refactor finality relay helper definitions
* add missing doc
* removed commented code
* fmt
* disable rustfmt for macro
* move best_finalized method const to relay chain def
2024-04-10 10:28:37 +02:00
Adrian Catangiu
1fb70c7ed7
Integrate BEEFY with Rialto & Millau runtimes ( #1227 )
...
* Add Beefy pallet to Rialto runtime
* Add Beefy gadget to Rialto node
* Add MMR pallet to Rialto runtime
* Add Beefy pallet to Millau runtime
* Add Beefy gadget to Millau node
* Add MMR pallet to Millau runtime
* Add pallet_beefy_mmr to Millau runtime
* Add pallet_beefy_mmr to Rialto runtime
* Implement MMR and BEEFY APIs in Rialto
* fix unit tests
- should_encode_bridge_send_message_call() tests for new
runtime encoding resulted from newly added pallets.
- runtime size_of::<Call>() slightly increased from newly
added pallets.
* fix grumbles
* tighten clippy allowances
* fix more grumbles
* Add MMR RPC to Rialto and Millau nodes
Also implement MmrApi in Millau runtime.
* rialto: use upstream polkadot_client::RuntimeApiCollection
2024-04-10 10:28:37 +02:00
Antonio Dropulic
7b30098a12
update dependencies ( #1229 )
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
6396239e18
cargo +nightly fmt --all ( #1192 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7b4f1c2236
Limit max call size of Rialto/Millau runtimes ( #1187 )
...
* max call size <= 230 bytes
* fix benchmarks
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
Svyatoslav Nikolsky
c0df990b90
copypasted -> copied ( #1168 )
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
Svyatoslav Nikolsky
084da4343d
Box large arguments of GRANDPA pallet ( #1154 )
...
* box large arguments
* benchmarks
* fix
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
Svyatoslav Nikolsky
7369ff9d70
Move some associated types from relay_substrate_client::Chain to bp_runtime::Chain ( #1087 )
...
* move some associated types from relay_substrate_client::Chain to bp_runtime::Chain
* dummy commit
* Revert "dummy commit"
This reverts commit 81bc64aa092df115a7c68e7bb7ca5e83ec31fd20.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
03a54df398
Fix delivery transaction estimation used by rational relayer ( #1109 )
...
* fix delivery transaction estimation in greedy relayer
* fixed typo
* improve logging
* improve logging
* fmt
* fix compilation
* fmt
* Update relays/lib-substrate-relay/src/messages_target.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3ef4574594
Stored conversion rate updater ( #1005 )
...
* update conversion rate: initial commit
* Rialto=Polkadot && Millau=Kusama + actually update conversion rates
* update deployment scripts and readme
* allow non-zero difference between stored and real rates
* dummy commit
* Revert "dummy commit"
This reverts commit a438198180a8385feeaaca60c9d2da0950465215.
* clippy
* #[allow(clippy::float_cmp)] in conversion rate update
* dummy
* Revert "dummy"
This reverts commit 90cd6e47cda56f655e94dbef76138e6cc58d664a.
* spell
* shared_value_ref() -> get()
* Revert "shared_value_ref() -> get()"
This reverts commit 20aa30de6a59b2099cfba3e9676e71200b7bb468.
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
Hector Bulgarini
b1db3df199
Bridge/This Chain Ids should be exposed as constants on pallet level. ( #1085 )
...
* Adding BridgedChainId constant to message pallet
* Addressing PR feedback
2024-04-10 10:28:37 +02:00
Tomasz Waszczyk
f86d101d7c
Fix full spellcheck ( #1076 )
...
* fix(spellcheck): test of fixing
* fix(hunspell): improved many typos etc.
* fix(hunspell): all errors solved
* fix(hunspell): extended scope of files - the build should fail
* Return error code.
* Fix spelling, sort dictionary.
* fix(hunspell): added fix to gitlabs check
* fix(typo): one typo and test of verification on github
* fix(typo): one typo
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
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
f5f73537a8
bump dependencies before start referencing polkadot repo ( #1048 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
dfdd541bc9
pre and post dispatch weights of OnDeliveryConfirmed callback ( #1040 )
...
* pre and post dispatch weights of OnDeliveryConfirmed callback
* Update modules/messages/README.md
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* clippy + compilation
* fix test issue from parallel PR
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
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
6ff79e9959
Return dispatch_fee_payment from message details RPC ( #1014 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ee43a560f8
Relay basic single-bit message dispatch results back to the source chain ( #935 )
...
* relay dispatch result flags back to the source chain
* OnMessagesDelivered callback
* add lane id to OnDeliveredMessages callback
* fix benchmarks && upate weights
* clippy
* clippy
* clipy another try
* OnMessagesDelivered -> OnDeliveryConfirmed
* Update primitives/messages/src/source_chain.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
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
Hernando Castano
613803a15d
Bump Substrate to 286d7ce ( #1006 )
...
* Bump dependencies
- Substrate to `74a1bfdcc`
- `finality-grandpa` to `0.14.1`
- `fs-swap` to `0.2.6`
* Add `pallet_randomness_collective_flip` to runtimes
* Rename GenesisConfig fields
See Substrate PR: https://github.com/paritytech/substrate/pull/8990
* Missed PoA renames in Rialto GenesisConfig
* Use `spawn_essential_handle` for transaction pool
See Substrate PR: https://github.com/paritytech/substrate/pull/9074
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ec8412b6d0
rename messages_dispatch_weight -> message_details ( #996 )
...
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Hernando Castano
a6379d2968
Bump Substrate ( #986 )
...
* Bump Substrate to commit `0495ead4`
* Derive MaxEncodedLen for MillauHash
* Add new config params to Balances pallet
* Update Millau and Rialto service files
* Add new Config items to mock runtime
* Bump Substrate to `37bb3ae7`
* Update Aura worker params
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
Hernando Castano
d53ecbdb3b
Bump Substrate to b094edaf ( #958 )
...
* Bump Substrate to commit `b094edafd1cd5d26e49ecbf92b0ce7553cfad717`
* Remove unsafe random seed method
See: https://github.com/paritytech/substrate/pull/8718
* Update Subkey syntax
See: https://github.com/paritytech/substrate/pull/8678
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
4916ec3432
Remove deprecated Runtime Header APIs ( #932 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a69026af44
Use complex headers+messages relay in test deployments ( #905 )
...
* use complex relay in deployments
* enable lane 00000001
* add alerts for lane 00000001
* revert local substrate relay
* updated doc
* review
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
0d60f42b5e
Use Substrate state_getReadProof RPC method to get storage proofs ( #893 )
...
* use Substrate state_getReadProof method instead of pallet-bridge-messages-rpc
* Fix typo
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00