Svyatoslav Nikolsky
804ef55146
Move storage keys computation to the message-lane pallet ( #478 )
...
* compute required storage keys in the message-lane pallet
* Update modules/message-lane/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
cc1da1bb39
Ability to halt/resume message-lane pallet ( #472 )
...
* halt/resume message-lane pallet
* fmt
* Update modules/message-lane/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* include weights in halt/resume operations
* remove trailing space
* set_owner
* Shorten doc comment length
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ef9357596f
Return cumulative dispatch weight of messages from the messageLane_proveMessages ( #469 )
...
* implement OutboundLaneApi and InboundLaneApi for Millau /Rialto runtimes
* fixed typo
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
74249a0896
Integrate message-lane module RPCs into Rialto/Millau nodes ( #458 )
...
* integrate message-lane RPCs into Millau and Rialto runtime
* fmt
* use instance in InboundLanes
* moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e2d9b6393d
Integrate Rialto <-> Millau message lanes into Millau/Rialto runtimes ( #386 )
...
* millau -> rialto lanes integration
* extrace common message-lane integration types into bridge-runtime-common
* rialto_messages.rs in Millau runtime
* tests
* Update bin/rialto/runtime/src/millau_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* RELAYER_INTEREST_PERCENT -> RELAYER_FEE_PERCENT
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* estimate_message_dispatch_and_delivery_fee returns Result
* Update bin/rialto/runtime/src/millau_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update bin/rialto/runtime/src/millau_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update bin/rialto/runtime/src/millau_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* fmt
* mowed weight formula to primitives
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
5accb2b339
InboundLaneApi::latest_confirmed_nonce ( #429 )
...
* InboundLaneApi::latest_confirmed_nonce
* Fix wording and typo
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a37c1762dc
(optionally) include outbound lane data into messages proof ( #428 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
bff930d01e
Reward relayers for dispatching messages ( #385 )
...
* reward relayers for dispatching messages
* clippy
* Update modules/message-lane/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* added comment
* Update modules/message-lane/src/inbound_lane.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update modules/message-lane/src/inbound_lane.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* SubmitterId + RelayerId -> AccountId
* add confirmation_relayer arg to pay_relayer_reward
* cargo fmt --all
* removed verify_and_decode_messages_proof from SourceHeaderChain
* &mut self -> RefCell
* Optimize max messages at inbound lane (#418 )
* Add tests for checking messages above max limit
Signed-off-by: MaciejBaj <macie.baj@gmail.com >
* Extend the relayers entry of inbound lane by additional msg nonce
Signed-off-by: MaciejBaj <macie.baj@gmail.com >
* Support additional message nonce from inbound relayers
Signed-off-by: MaciejBaj <macie.baj@gmail.com >
* Code format
Signed-off-by: MaciejBaj <macie.baj@gmail.com >
* Merge messages range for highest relayers
* Change unwrap() to ensure() while accessing relayers
* Edit rustdocs for relayers deque at inbound lane data
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Declare additional relayers A & B and use across tests consistently
Signed-off-by: MaciejBaj <macie.baj@gmail.com >
* Remove duplicates and improve naming for inbound lane tests
* Fix test checking max limit per inbound lane
* Correct relayers rewards loop after a proof is received
* Remove redundant check for messages ahead of received range
* Correct grammar at inbound lane tests rustdocs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Improve code quality of relayers updates 💅
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Test dispatches above max limit from same relayer
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Fix typo.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Maciej Baj <macie.baj@gmail.com >
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
07a514e9f7
Get substrate dependencies from crates io ( #387 )
...
* get Substrate dependencies from crates.io
* removing unused dependencies
* cargo fmt --all
* remove commented dependencies
* remove commented dependencies again
* try to fix compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f43e405b5e
update async-std ( #388 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7f7d62d813
Split payload types ( #383 )
...
* split payloads (inbound/outbound/opaque/dispatch) + fees (inbound/outbound)
* added tests
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
be050bda84
Bump Substrate to v2.0.0 ( #382 )
...
* Change script to update versions.
* Bump versions.
* Address remainders.
* cargo fmt --all
* Fix tests.
* Whitelist BlueOak license
* Fix benchmarks?
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3cd8937b38
Fees, weights, message delivery and dispatch ( #339 )
...
* introduce BridgedHeaderChain trait
* LaneMessageVerifier + tests
* fixed tests
* do not expose intenal functions
* cargo fmt --all + fix no_std compilation
* ByWeightDispatcher
* process queued messages from message-lane::on_initialize
* scheduled_messages_are_processed_from_on_initialize
* flush
* deal with fees + weights
* drop heavy messages on dispatch
* cargo fmt
* clippy
* fix comment
* Update primitives/message-lane/src/source_chain.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* removed messages_processed
* Update primitives/message-lane/src/source_chain.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update modules/message-lane/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* remove queueing from message-lane
* also remove queueing from RPCs
* remove by-weight traces
* dispatch fee
* receiving -> delivery
* receival -> delivery
* remove extra line
* Update primitives/message-lane/src/source_chain.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* cargo fmt --all
* clippy
* let dispatch_weight to be larger than actual_dispatch_weight
* post-merge fix
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d918bcb6f8
Remove queueing from message-lane ( #352 )
...
* remove queueing from message-lane
* also remove queueing from RPCs
* another trace
* new clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
fce133e2cb
Make message-lane Event generic ( #345 )
...
* make message-lane Event generic
* cargo fmt --all
* Update modules/message-lane/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c7437c7d91
Custom RPC methods for DummyOrdered pallet ( #317 )
...
* RPC for DummyOrdered
* add test for RPC
* proof returned by RPC is Vec<<Vec<u8>>>.encode()
* retrieval -> receiving
* bp-runtime crate
* bp-runtime supports no_std
* cargo fmt --all
* jsonrpc_core::BoxFuture
* Update modules/message-lane/rpc/Cargo.toml
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update modules/message-lane/rpc/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* messageLane_ prefix for RPC methods
* Update primitives/runtime/Cargo.toml
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update primitives/runtime/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update modules/message-lane/rpc/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update modules/message-lane/rpc/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update modules/message-lane/rpc/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f6d45a38da
Initial version of DummyOrdered pallet ( #299 )
...
* initial commit of DummyOrdered (aka message-lane) pallet
* API for relay
* cargo fmt --all
* some clippy + no_std
* more clippy + no_std
* inbound lane tests
* outbound lane tests
* cargo fmt --all
* prune old messages whenever outbound lane is updated
* do not care about MessageNonce overflow
* cargo fmt --all
* update crate docs
* MaxHeadersToPruneAtOnce -> MaxMessagesToPruneAtOnce
* MessageAction -> MessageResult
* cargo fmt --all
* fire MessageAccepted + MessagesDelivered
* confirm message processing
* cargo fmt --all
* clippy
* cargo fmt again
* Update modules/message-lane/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update modules/message-lane/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* use crate::*
* cargo fmt --all
* Storage -> S
* Update modules/message-lane/src/outbound_lane.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* add method doc
* Update modules/message-lane/src/inbound_lane.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* added detailed module docs
* Update modules/message-lane/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* updated OnMessageReceived docs
* prune only when new message is sent
* removed #![warn(missing_docs)]
* fixed merge with overlapped PR
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2024-04-10 10:28:37 +02:00