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
Svyatoslav Nikolsky
cb90ea0979
Pre-create metrics registry before loop is started + administrative metrics ( #848 )
...
* administrative metrics
* fmt
* fix compilation
* fix compilation again
* and another one
* remove GenericLoopMetrics
* chttp -> isahc
* remove redundant marker
* not about price metrics
* fmt
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
Svyatoslav Nikolsky
324e083cba
Changed delivery and dispatch fee computation methods ( #795 )
...
* removed weight <-> fee mess
* updated documentation
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
89b0f7beda
verify ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT constant value ( #731 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1bf2eb1ab5
Message lane pallet parameters + updatable conversion rate ( #728 )
...
* message lane pallet parameters
* updated comment
* Update modules/message-lane/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* fmt
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
32342bf6e5
remove lower limit of message weight ( #727 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ca91d34059
limit number of pending messages at outbound lane ( #715 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2f457775bb
Account proof size in weight formula ( #679 )
...
* fix broken message lane benchmarks
* proof-size related benchmarks
* impl Size for proof parameters
* include proof weight into weight formula
* left TODO
* fixed proof size
* WeightInfoExt::receive_messages_proof_weight
* charge for extra message bytes delivery in send_message
* removed default impl of WeightsInfoExt
* moved weight formulas to WeightInfoExt
* receive_messages_proof_outbound_lane_state_overhead is included twice in weight
* typo
* typo
* fixed TODO
* more asserts
* started wotk on message-lane documentation
* expected_extra_storage_proof_size() is actually expected in delivery confirmation tx
* update README.md
* ensure_able_to_receive_confirmation
* test rialto message lane weights
* removed TODO
* removed unnecessary trait requirements
* fixed arguments
* fix compilation
* decreased basic delivery tx weight
* fmt
* clippy
* Update modules/message-lane/src/benchmarking.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* structs
* Update primitives/millau/src/lib.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* removed readme.md
* removed obsolete trait bounds
* Revert "removed readme.md"
This reverts commit 50b7376a41687a94c27bf77565434be153f87ca1.
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update bin/runtime-common/src/messages.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* PreComputedSize
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
Svyatoslav Nikolsky
acee5580ca
decode call after spec_version check ( #663 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
0f56f18778
Use real weights to compute message delivery and dispatch fee ( #598 )
...
* message fee formula
* update GetDelvieryConfirmationTransactionFee
* include cost of transactions (i.e. not only dispatch cost) in delivery_and_dispatch_fee
* endow relayers fund account
* include db ops weight in max tx weight estimation
* (in bytes)
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
fd7f2a45d8
Fixed messages count check ( #659 )
...
* fixed messages count check
* explicit check of `messages_count` in the receive_messages_proof
* change messages_count to be u32
* 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
9fbb922766
Estimate message fee api ( #600 )
...
* estimate_message_delivery_and_dispatch_fee runtime API
* auto-determine message fees in relay
* remove fee argument from relay calls
* Fix import of weight contant
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
63e2655c8b
Add messages count parameter to delivery transaction ( #581 )
...
* add messages count parameter to delivery transaction
* fix benchmarks compilation
2024-04-10 10:28:37 +02:00
Hernando Castano
ee655b1057
Update Substrate Dependency ( #566 )
...
* Update `sp-io` dependency
* Rename Trait to Config
* RustFmt
* Bump `sp-io` again
* Use new frame_system weight types in Rialto and Millau runtimes
* Update test Runtimes to use new weight types
* Bump `sp-io` again
* Update to not-the latest first.
* Update benchmarks.
* Another Trai.
* Move new weight types into runtime primitive crates
This allows us to check limits for extrinsics from other parts
of the codebase without pulling in the entire chain runtime.
* Remove leftover comments
* Move new functions to a better location
* Small formatting fixes
* Add actual documentation to new weight config types
* Decrease maximum block weight of Millau chain
* Decreease maximum block length of Millau chain
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
81a3e7cce3
reject too large (by size) messages ( #551 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f1949c6342
Limit max number of messages in delivery transaction ( #541 )
...
* limit max number of messages in delivery tx
* support max-messages-in-delivery-tx in relayer
* clippy
* clippy
* Update modules/message-lane/src/lib.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
a872ee6ff1
lower limit for message weight ( #536 )
...
* lower limit for message weight
* fmt
* do not include tx overhead in weights returned by weight_limits_of_message_on_bridged_chain
* Use correct chain in comment
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
6dc267393a
Use different chain primitives in Millau ( #517 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
20fc30404a
Fixed referenced balance in rialto_messages.rs ( #509 )
...
* fixed referenced balance in rialto_messages
* names
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
20fea45d1f
Verify messages proofs ( #480 )
...
* verify messages proofs
* fmt
* clippy
* grumbles
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3d24a4e34e
verify messages delivery proofs ( #482 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d4fc7bebdc
Millau -> Rialto messages relay ( #399 )
...
* Millau messages -> Rialto relay
* prepare for custom race strategy of delivery race
* custom strategy for delivery race
* update TODOs
* add reference to issue 457
* impl reconnect
* clippy
* fix check in test
* fmt
* removed obsolete TODO
* fixed another TODOs
* fmt
* use MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE const from primitives
* Update relays/messages-relay/src/message_lane_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* added SubstrateMessagesProof typedef
* fix test
* removed comment
* additional_proof_required -> ProofParameters
* typo
* multiline literal
* clippy
* fix typo
* and_then -> await
* update_source_latest_confirmed_nonce
* Update relays/messages-relay/src/message_race_delivery.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
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
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
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