Svyatoslav Nikolsky
a428420866
Cli option for greedy relayer + run no-losses relayer by default ( #1042 )
...
* cli option for greedy relayer + run no-losses relayer by default
* trigger build
* Revert "trigger build"
This reverts commit f77ae3a634b909bb4dc915941a4c1011a86019f0.
* NoLosses -> Rational
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
166b5309e6
give real value to Rialto and Millau tokens ( #1038 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
fd39d3519e
Use real conversion rate in greedy relayer strategy ( #1035 )
...
* use real conversion rate in greedy relayer strategy
* only accept positive, normal numbers in FloatJsonValueMetric
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
084c2e6c64
fixed metrics prefix ( #1037 )
2024-04-10 10:28:37 +02:00
halfpint104
84da766881
Use kebab-case for bridge arguments ( #1036 )
...
* Updates bridge CLI arguments to be kebab case
* Updates scripts to use kebab case for bridge initialisation and relaying of headers/messages
* Updates message sending subcommand to be kebab case
* Updates documentation for message sending subcommand
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ecd20d9d24
Shared reference to conversion rate metric value ( #1034 )
...
* shared conversion rate metric value
* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
db0216dabb
estimate transaction fee ( #1015 )
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
Chevdor
c8aeb11b26
Update the wasm builder to substrate master ( #1029 )
...
* chore: update the wasm builder to substrate master
* Bump Substrate
* Update weight of sending remarks
ref https://github.com/paritytech/polkadot/pull/3354
Co-authored-by: Hernando Castano <hernando@hcastano.com >
2024-04-10 10:28:37 +02:00
kaichao
655901250d
Make target signer optional when sending message. ( #1018 )
...
* make target signer optional in send message.
* remove non-used argument
* fmt
* better doc
* trigger build
* fix clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3e103c16ce
greedy relayer don't need message dispatch to be prepaid if dispatch is supposed to be paid at the target chain ( #1016 )
2024-04-10 10:28:37 +02:00
kaichao
010588e95a
Allow Root to assume SourceAccount. ( #1011 )
...
* Allow Root to assume SourceAccount.
* fmt code
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
87c48f649b
Use plain source_queue view when selecting nonces for delivery ( #1010 )
...
* use plain source_queue view when selecting nonces for delivery
* Revert "use plain source_queue view when selecting nonces for delivery"
This reverts commit f1fdc3fa9a0934271b125328e69e4f16014780d1.
* Revert "Revert "use plain source_queue view when selecting nonces for delivery""
This reverts commit ccefa5ece24c675649251ebc5c686ef972eed2f4.
* clippy
* fmt
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
c69c682a4c
Add --only-mandatory-headers mode ( #1004 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
09df16612b
Messages relayer operating mode ( #995 )
...
* introduce relayer mode enum
* removed MaximalReward mode
* TODO
* Saturating -> SaturatingAdd
* ref issue in TODOs
* Update relays/messages/src/message_race_delivery.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
f321b07606
Rococo <> Wococo relayer balance guard ( #998 )
...
* relayer balance guards in Rococo <> Wococo
* removed printlns
* update constant
* update constant
* start balance guard for Wococo -> Rococo
* Update relays/bin-substrate/src/chains/wococo_headers_to_rococo.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/bin-substrate/src/chains/wococo_headers_to_rococo.rs
Co-authored-by: Hernando Castano <HCastano@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
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
Svyatoslav Nikolsky
4a47452c20
Move ChainWithBalances::NativeBalance -> Chain::Balance ( #990 )
...
* move ChainWithBalances::NativeBalance -> Chain::Balance
* dummy commit
* Revert "dummy commit"
This reverts commit c00642153d260685a91d4fffbc424d225741fceb.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
812e782904
fix clippy issues ( #991 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
37d067c0e0
Update submit finality proof weight formula ( #981 )
...
* updated weight formula for submit_finality_proof
* remove common prefix traces
* update docs
* single benchmark
* Re-generate weights.
* Update delivery transaction limits
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
Co-authored-by: Hernando Castano <hernando@hcastano.com >
2024-04-10 10:28:37 +02:00
Denis Pisarev
0b7f40a371
Move CI from GitHub Actions to GitLab ( #814 )
...
* CI: do not trust this CI 1
* CI: don't want to trigger unneded statuses
* CI: debug 1
* CI: new CI
* CI: temp allow failure
* CI: exclude paths
* doc: check if docs won't trigger pipelines
* doc: check hybrid changes pipeline
* doc: do not push excluded files together with others
* CI: undebug fmt
* CI: better deny
* CI: fix deny and spellcheck
* CI: global backtrace
* CI: deny config
* CI: publishing
* Dockerfile: metadata fix [skip ci]
* CI: revert me
* CI: debug bash
* CI: mv ci.Dockerfile; fix buildah bug
* CI: fix artifact name
* Dockerfile: fix context
* CI: separate deny check licenses
* CI: when to run
* CI: unneded stuff in these Dockerfiles
* CI: merged test-refs and build-refs
* CI: test-build optimizations
* CI: changes, web, scheduled pipelines now work as intended
* CI: use tested production CI image
* CI: substitute GHA
* Fix clippy.
* Moar clippy fixes.
* Fix more.
* Finally fix all?
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
6301ae0636
Always run on-demand headers relay in complex relay ( #975 )
...
* always run on-demand headers relay in complex relay
* fix compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f8f8f42a89
in auto-relays keep trying to connect to nodes until connection is established ( #971 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ea82ad67cf
removed stray file ( #969 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
91c669ec78
Serve multiple lanes with single complex relay instance ( #964 )
...
* serve multiple lanes with single complex relay instance
* Update relays/bin-substrate/src/cli/relay_headers_and_messages.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* revert default value removal
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
fewensa
51bba378ca
Correct type error ( #968 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
bfaa6a4309
Start finality relay spec-version guards for Rococo <> Wococo finality relays ( #965 )
...
* start finality relay guards
* comment
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
Tomasz Drwięga
c8db52672f
Fix account derivation in CLI ( #952 )
...
* Fix account derivation.
* Fix tests.
2024-04-10 10:28:37 +02:00
Hernando Castano
7dc564a067
Add Wococo<>Rococo Header Relayer ( #925 )
...
* Add Wococo primitives crate
* Add more Wococo boilerplate code
* Add CLI support for initializing the Wococo<>Rococo bridge
* Add support for relaying headers between Rococo and Wococo
* Fix test
* RustFmt
* Fix compilation issues related to enum naming
* Bump Rococo `spec_version`
* Remove stray Westend references
2024-04-10 10:28:37 +02:00
Hernando Castano
76625ed180
Remove Westend<>Rococo header sync ( #940 )
...
* Remove scripts for Westend<>Rococo header sync
* Remove Westend<>Rococo header sync code
* Remove Westend<>Rococo init bridge CLI option
* Modify Westend mock call to be placeholder
* Fix call encoding test
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4321d20d2f
jsonrpsee alpha6 ( #938 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
622a4b5c6f
reonnect to failed client in on-demand relay background task ( #936 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
38cd3a328d
Do not spawn additional task for on-demand relays ( #933 )
...
* do not spawn additional task for on-demand relays
* compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
0e34a11309
Relay at least one header for every source chain session ( #923 )
...
* relay at least one header for every session
* Update relays/bin-substrate/src/on_demand_headers.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
Tomasz Drwięga
7c2b54c5e7
Make sure that relayers have dates in logs. ( #927 )
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
479e51c67b
Add pruning to bechmarks & update weights. ( #918 )
...
* Insert headers in benchmarks.
* Fix benchmarks.
* Lower number of headers.
* Avoid hardcoding numbers.
* Update weights.
* cargo fmt --all
* Remove todo.
* Fix test.
* Address review comments.
* Fix borrowed value.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
978de95938
Fix issue with on-demand headers relay not starting ( #921 )
...
* require lane source -> target headers when weknow all headers that have produced messages, but are unable to deliver all messages because of unrewarded relayers vec capacity
* Update relays/messages/src/message_race_delivery.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
63ce1b5973
Prefix in relay loops logs ( #920 )
...
* prefix in relay loops logs
* fmt
2024-04-10 10:28:37 +02:00
Niklas Adolfsson
f857771ce8
Update jsonrpsee to 0.2.0-alpha.5 ( #914 )
...
* update jsonrpsee to 0.2.0-alpha.5
* cargo fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
5e26ba4999
(temporarily) Switch to jsonrpsee master ( #913 )
...
* (temporarily) switch to jsonrpsee master
* removed param used for tests
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
49e04b7b26
Update Kusama/Polkadot metrics ( #910 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f6fd87f39e
fix polkadot primitives ( #908 )
2024-04-10 10:28:37 +02:00
Hernando Castano
b8e021c22c
Prettify test output when encoding doesn't match ( #907 )
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
234e6b95e4
Update weights ( #898 )
...
* New weights.
* Fix test.
* cargo fmt --all
2024-04-10 10:28:37 +02:00