Tomasz Drwięga
8f11732bb9
Uniform git dependencies (Backport of substrate#2589) ( #805 )
...
* Make Substrate deps uniform
* Rest of the deps.
* Fix broken merge.
* Revert substrate.
* Fix tests
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
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
f87053c1cb
Relay Millau && Rialto headers using (future) finality verifier API ( #761 )
...
* finality proofs relay
* SyncHeader::is_mandatory
* empty ancestry proof
* logs
* fixed submit condition
* fixed wrong split index
* tick comment
* recent_finality_proofs
* basic finality loop tests
* removed obsolete files
* rename files in substrate relay
* fmt
* clippy
* fixed TODOs
* clippy
* stop syncing if target node is out of sync
* more clippy
* more clippy
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* docs
* moved doc
* typo
* Update relays/finality-relay/src/finality_loop_tests.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/finality-relay/src/finality_loop_tests.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* header_and_finality_proof_by_number -> header_and_finality_proof
* VecDeque isn't required (because of make_contiguous)
* fixed wrong expect
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/substrate/src/rialto_headers_to_millau.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/substrate/src/rialto_headers_to_millau.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* RialtoSyncHeader
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* removed wrong comment
* Update relays/finality-relay/src/finality_loop.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* fix used runtime methods names
* fix for new jsonrpsee
* fix comment
* initialize finality verifier pallet
* fmt
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
a2b8bb191b
Migrate to jsonrpsee v2 ( #787 )
...
* POC jsonrpsee v2
* POC update ws client
* connect to eth nodes using ws
* fix for subscriptions
* reverted unncecessary changes
* reference jsonrpsee from crates.io
* fixed eth port in deployments
* fmt
* order deps
* remove unnecessary comment
* clone is no longer required for subscriptions
* treat RpcError::Internal as connection error
* resubscribe on terminate
* Update deployments/bridges/poa-rialto/entrypoints/poa-exchange-tx-generator-entrypoint.sh
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
da41afd105
Add Bridge calls encoding to relay CLI ( #780 )
...
* Bridge calls.
* Allow encoding messages for both Rialto and Millua.
* Add docs.
* Display full extrinsics in debug.
* cargo fmt --all
* Use info instead of debug,.
* Clarify units.
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
077e2cc11b
Derive bridged accounts ( #781 )
...
* Add derivation support.
* Add custom decoder for Accounts.
* cargo fmt --all
* Fix warn.
* Fix articles.
Co-authored-by: Hernando Castano <castano.ha@gmail.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
3764cda726
Add few CLI helpers ( #764 )
...
* Adding call encoding.
* Add message payload encoding.
* Nicer output.
* Add fee estimation.
* cargo fmt --all
* Split message payload encoding into separate command.
* Use HexBytes.
* cargo fmt --all
* Fix compilation.
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
c9a8ac0b32
Bump serde_json from 1.0.63 to 1.0.64 ( #777 )
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
7602d910d4
Disable cache in CI builds. ( #772 )
...
* Disable cache.
* Fix tests.
* Fix clippy?
* cargo fmt --all
2024-04-10 10:28:37 +02:00
Andreas Doerr
de5ac085a1
Bump Substrate and Deps ( #770 )
...
* Bump Substrate and Deps
* silence clippy
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
19f021e34c
Add default for some options. ( #763 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1b2e6cdeb0
Generate large messages ( #700 )
...
* generate large messages
* consider headers sync lag when computing number of rewards in confirmation
* more fixes
* fix logs
* fix warnings
* do not wait until tx that has delivered nonces will be finalized before submitting other tx
* tests for maximal weight/size
* cleanup
* cleanup
* clippy
* compilation
* args for dispatch weight and remark size
* ExplicitOrMaximal
* clippy
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
b806fb7756
Fix formatting. ( #738 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
90113303f1
Fix updated clippy grumbles ( #733 )
...
* Revert "Pin Rust Nightly to 2020-12-17 (#652 )"
This reverts commit e54e6f7e3d34c28d698e637f9099162b3c1917e9.
* fix clippy
* clippy again
* more clippy in test code
* and new cargo fmt
* another try
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
470b51d2a9
Rework relay CLI a bit ( #734 )
...
* Change CLI UX.
* De-duplicate main.
* De-duplicate send message.
* Add more docs and extract functions.
* Fix scripts.
* cargo fmt --all
* Add missing 'u'.
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
2493ce93b3
Bump env_logger from 0.8.2 to 0.8.3 ( #725 )
...
Bumps [env_logger](https://github.com/env-logger-rs/env_logger ) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases )
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md )
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.2...v0.8.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
7aa51f8d30
Update to latest substrate ( #723 )
...
* Bump substrate deps.
* Bump scale.
* Bump ethabi.
* Remove inherent from aura.
* Migrate to construct_runtime
* cargo fmt --all
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c4b931ba29
Keep multiple latest confirmed nonces at source in messages relay ( #719 )
...
* keep multiple latest confirmed nonces at source in messages relay
* post-merge fix
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
010748e409
Fix max extrinsic weight in relay + logging ( #717 )
...
* fix max weight in relay + logging
* removed duplicate info
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
dependabot-preview[bot]
2f44aecd97
Bump serde_json from 1.0.61 to 1.0.62 ( #708 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.61...v1.0.62 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
8953967d92
pause relays(s) when node is syncing ( #605 )
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
adb58d8fb0
Bump log from 0.4.13 to 0.4.14 ( #692 )
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
44bf84269a
Extract common part of relay loops ( #660 )
...
* extract common parts of relay loops: begin
* merge client impls
* backoff in exchange loop
* reconnect without clone
2024-04-10 10:28:37 +02:00
Andreas Doerr
926520292e
Prevent potential signature reuse ( #667 )
...
* patch audit findings #42
* extend msg signature for substrate relay
* signature verification test
* make proof dependet on call_dispatch crate
* silence clippy
* revert deny exception
* address code review
* since it's not really a proof, call it digest
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
38c1bf89b4
Update weight related parameters in relay ( #662 )
...
* update weight-related parameters in relay
* asserts + docs
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
dependabot-preview[bot]
507edb950c
Bump log from 0.4.11 to 0.4.13 ( #657 )
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
d630b6f751
Bump futures from 0.3.9 to 0.3.12 ( #655 )
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
b94ac80a55
Bump async-std from 1.8.0 to 1.9.0 ( #654 )
2024-04-10 10:28:37 +02:00
Hernando Castano
c6df9924e4
Move justification code to primitives crate ( #640 )
...
* Move justification module to header-chain primitives crate
* Get justification module compiling in new location
* Get justification module tests compiling
* Use justification code from `header-chain` crate
Mostly compiles, having issues with std/test feature flags across crates.
* Move some code around
* Move justification tests to integration testing crate
* Add `test-utils` crate
* Remove tests and test-helper module from justification code
* Use `test-utils` in Substrate bridge pallet tests
* Remove `sp-keyring` related code from `pallet-substrate-bridge`
* Remove `helpers` module from `pallet-substrate-bridge`
* Add some documentation
* Add more documentation
* Fix typo
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
0f7a096d55
Do not refetch completion data instantly ( #649 )
...
* do not refetch completion data instantly
* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f3ea6a8d3d
Reward delivery confirmation transaction submitter (aka confirmation relayer) ( #599 )
...
* reward confirmation relayer
* Update modules/message-lane/src/instant_payments.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* added some constants
* pallet_balances
* removed comment
* fix typo
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2cfd2e72b7
fix log level ( #644 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
dad5374bc2
swap target <-> source in race logs ( #641 )
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
58fbd8cb49
Bump substrate & deps ( #637 )
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
dependabot-preview[bot]
5ed92180bb
Bump serde_json from 1.0.60 to 1.0.61 ( #606 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
043a008723
add relayers_state param to the receive_messages_delivery_proof ( #584 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
595481f02e
Enable Wasmtime and Remove secp256k1 ( #593 )
...
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
f26775d690
Rialto to Millau Transfer Generator ( #568 )
...
* Add option to relay for sending transfers to Millau chain
* Endow derived accounts on Millau chain
* Update message generator entrypoint script to send transfers
* Use correct command when sending messages
* Send Root messages from Root origin on source chain
* Wrap calls from Root Origin in Sudo Call
* Allow Root to send messages without paying fees
* Use correct variable when sending messages to Rialto
* Print warning if no message type is provided to script.
* Add note mentioning that certain source origins aren't supported yet
* Use correct runtime when initializing header sync
* Remove option to send messages as Root
* Remove endowment of derived Root accounts
* Fix indentation.
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
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
8a5b51a944
Limit size of message delivery transaction ( #575 )
...
* limit messages size in delivery transaction
* docs
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
5a790c9874
Bump async-std from 1.7.0 to 1.8.0 ( #574 )
2024-04-10 10:28:37 +02:00
Hernando Castano
0ff8c2437c
Cross-Chain Transfer Generator ( #535 )
...
* Attempt at adding Cross-Chain Transfer Generator
* Add Transfer subcommand for sending messages to Rialto
* Add temp helper script for sending messages
* Remove Message and Lane Ids from Dispatch Event
* Increase transfer amount used by script
* Endow derived Dave account on Rialto with funds
* Update Message generator to send more types of messages
This commit first of all updates the script to use the new CLI
commands for sending messages. Second, it adds messages which are
sent from both Target and Source origins.
* Generate messages from Root origin
* Remove dbg! logs from relayer
* Log AccountId as well as HexId
* Remove Balances logs
* Add InstanceId and MessageId back to Dispatch Event
* Add InstanceId and MessageId types for Apps
* Add missing comment
* Document derived accounts as tests
* Move shared commands to variables
* Add example usage for send_message script
* Add docs to message variants
* Fix Clippy complaint
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2944f997d1
Limit max number of unconfirmed messages at inbound lane ( #545 )
...
* limit maximal number of unconfirmed messages at inbound lane
* unrewarded_relayer_entries API
* change relay to support max unrewarded relayer entries
* Update modules/message-lane/src/inbound_lane.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update relays/messages-relay/src/message_lane_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* removed pub
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
dependabot-preview[bot]
091a9ba7e2
Bump serde_json from 1.0.59 to 1.0.60 ( #563 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2d08a9d213
Polkadot integration ( #542 )
...
* kusama primitives + client
* polkadot primitives + client
* lost Chain definitions
* fix compilation and fmt
* Update primitives/runtime/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