Tomasz Drwięga
a2566970eb
CLI: Estimate Fee ( #888 )
...
* Move estimate-fee
* Add parsing test.
* Address review comments.
* Fix compilation.
* Move things around.
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
9f01c459bd
CLI: Send Message ( #886 )
...
* Send Message WiP
* It compiles.
* Add tests.
* Use common macro.
* Nicer balance display.
* Get rid of redundant send_message_call function.
* Fix clippy.
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
7c639687b6
CLI: Encode Message ( #889 )
...
* Encode message.
* Update docs related to `sender`
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
Co-authored-by: Hernando Castano <hernando@hcastano.com >
2024-04-10 10:28:37 +02:00
Hernando Castano
b569f201cf
Bump jsonrpsee to Alpha.3 ( #892 )
...
* Bump `jsonrpsee` to `alpha.3`
* Arc-ify `WsClient`
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d4489a0a92
Install CA certificates in relay images ( #880 )
...
* update CA certificates in relay images
* clippy
* clippy
* clippy
2024-04-10 10:28:37 +02:00
Hernando Castano
81d4eb9ea6
Westend Mock Runtime and Client ( #874 )
...
* Copy-Pasta Call code from mock Rococo to mock Westend runtime
* Update Westend client to include signing and call related code
* Add missing part of license header
* Move `account_info_storage_key` to `polkadot-core` crate
2024-04-10 10:28:37 +02:00
Hernando Castano
c6ae74725b
Bump Substrate ( #871 )
...
* Bump Substrate
* Change usage of "Module" to "Pallet"
Related Substrate PR: https://github.com/paritytech/substrate/pull/8372
* Add `OnSetCode` config param
Related Substrate PR: https://github.com/paritytech/substrate/pull/8496
* Update Aura Slot duration time type
Related Substrate PR: https://github.com/paritytech/substrate/pull/8386
* Add `OnSetCode` to mock runtimes
* Add support for multiple justifications
Related Substrate PR: https://github.com/paritytech/substrate/pull/7640
* Use updated justification type in more places
* Make GenesisConfig type non-optional
Related Substrate PR: https://github.com/paritytech/substrate/pull/8275
* Update service to use updated telemetry
Related Substrate PR: https://github.com/paritytech/substrate/pull/8143
* Appease Clippy
2024-04-10 10:28:37 +02:00
Hernando Castano
d9c553374c
Check for both possible error variants ( #870 )
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
ed5577bf33
Extract select_bridge macro. ( #869 )
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
52e3967a2d
Fix encode-call CLI options ( #868 )
...
* Add tests.
* Fix default and conflicting options.
* Fix default variant.
* Update tests.
2024-04-10 10:28:37 +02:00
Hernando Castano
2f1c4c23fc
Remove Substrate Pallet ( #866 )
...
* Remove `pallet-substrate-bridge`
* Fix transfer call encoding test
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
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
Tomasz Drwięga
5f16df28ed
CLI: Encode Call & Multiple Bridge Instances. ( #859 )
...
* Encode Call & Multiple Bridge Instances.
* Remove redundant clone.
* Fix comment.
* Rename pallet index bridge instance index.
* Update error messages related to target instances
Co-authored-by: Hernando Castano <hernando@hcastano.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
1dbba1b95b
De-duplicate signing/connection params. ( #861 )
...
Co-authored-by: Hernando Castano <hernando@hcastano.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
0d7291d729
CLI: Derive Account ( #860 )
...
* Move derive account.
* Fix account derivation.
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
da3f94d99f
CLI: Relay Messages ( #858 )
...
* Relay Messages.
* Fix docs.
* Fix copyright date.
* copyright increment
Co-authored-by: adoerr <0xad@gmx.net >
2024-04-10 10:28:37 +02:00
Hernando Castano
67cdca8aa4
Use GrandpaJustification instead of Vec<u8> in Pallet API ( #847 )
...
* Stop passing raw encoded justifications to pallet API
By having the API accept a struct-ified justification we are able to
better utilize the justifications fields for weight calculations.
* Update relayer code to use decoded justifications
* Add justification to `expect()` statement
* Fix some imports
* Make justification wrapper contain decoded justification
* Rename some fields
* Get rid of warnings
* Appease Clippy
* Only decode justification once at init time
* Remove unnecessary method
* Remove justification wrapper
This became kinda unnecessary since we could implement the FinalityProof
trait on GrandpaJustification directly.
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
904b9f4da5
Make relay CLI generic ( #849 )
...
* Start generalizing rialto-millau commands.
* cargo fmt --all
* Introduce generic balance.
* Unify message payloads.
* cargo fmt --all
* init - generic
* Attempt to unify send message.
* Start moving things around.
* cargo fmt --all
* Move init-bridge.
* cargo fmt --all
* Improve UX of bridge argument.
* Fix clippy.
* Fix docs and scripts.
* Add docs.
* Apply suggestions from code review
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Fix copyright.
* Add issue numbers.
* More todos.
* Update comments.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
b6d034afaf
fix delay in message_lane_loop_is_able_to_recover_from_connection_errors ( #850 )
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
bc50fa6616
Correctly format SS58-prefixed addresses in the CLI ( #845 )
...
* Fix SS58 formatting of addresses.
* cargo fmt --all
* Use only lifetime hint.
* Update relays/bin-substrate/src/cli.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Remove unnecessary optimisation.
* Add re-formatting test.
* cargo fmt --all
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4e4e9a8e4e
on-demand headers relay ( #833 )
...
* on-demand headers relay
* bool::then
* move file
* atomic submit_signed_extrinsic
* remove cli options from future
* test on-demand relay
* TODOs
* fixed initialization call for Westend -> Millau
* Update relays/client-substrate/src/client.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* removed on_demand_headers_relay.rs
* on_demand_headers_relay traces
* fix compilation
* fmt
* docs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
51fc83941b
Rococo (mocky)Runtime and Client ( #841 )
...
* Implement fake rococo runtime.
* Generate correct storage key.
* cargo fmt --all
* Move client-rococo.
* Satisfy clippy.
* Apply suggestions from code review
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Address review comments.
* Clippy again.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
70e9db4aad
Initialize logger properly. ( #843 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a17c7eb80c
Changed how relay loops are started ( #840 )
...
* slightly changed relay loop initialization
* git mv
* clippy
* more clippy
* loop_run -> run_loop
* review and clippy
* clippy
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
Tomasz Drwięga
acb872fbb0
Flatten back the structure ( #837 )
...
* Remove chains.
* Move relay clients.
* Flatten generic.
* Fix fmt.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
647eb80165
Westend->Millau headers relay in deployments ( #831 )
...
* reorganize monitoring
* Westend->Millau bridge
* support multiple bridges
* initialize Westend -> Millau bridge byMillau.George
* fix intersecting ports
* ignore dashboards
* single bridged network
* deal with multple --env-file args
* fix chain name
* use images from docker hub
* update show_help
* updated comment
* mount whole dashboards directory
* removed unneeded network
* reverted reverse-proxy changes
* prometheus -> targets
* separate Grafana.Dockerfile with builtin /etc/grafana
* Revert "separate Grafana.Dockerfile with builtin /etc/grafana"
This reverts commit 53e04c4556f882d19e3af0fac581a926b8e0c167.
* read dashboards from /etc/grafana/dashboards
* stop comment
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
c95b1eb970
relay_loop().await from main relay function ( #829 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4cd6d128ea
updat jsonrpsee ( #828 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d749bc3a96
Sync Westend to Millau ( #824 )
...
* make finality verifier pallet instantiable
* add second instance of finality verifier pallet to the Millau runtime
* add Westend -> Millau headers relay
* use wss to connect to public westend nodes
* initialize with best_finalized_block
* typo
* Revert "initialize with best_finalized_block"
This reverts commit 954ed2832372d67618abc1a06d47e66faa93f674.
* pass VoterSet by ref
* new bridge initialization code
* loop upper bound
* Polkadot -> Westend
* fixed tests compilation
* default-features
* assert
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
d9bec5f387
Reorganize relay code to make it easy to add new networks. ( #813 )
...
* Nest some crates.
* Alter command execution to make it easier to add new bridges.
* Rename sub-dirs.
* cargo fmt --all
* Address clippy.
* Update relays/substrate/src/rialto_millau/cli.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
53cdf66071
More tests for finality relay ( #816 )
...
* more tests for finality relay
* clippy
* remove env_logger dep
* fmt
* more clippy
* removed prune_unjustified_headers
* review
2024-04-10 10:28:37 +02:00
Hernando Castano
d8852fd197
Clean Finality Verifier Pallet ( #804 )
...
* Remove unused Config types from `pallet-finality-verifier`
* Remove unused AncestryChecker trait
* Remove ancestry proof parameter from relayer calls
* Update docs to reflect current state of pallet
* Remove mock ancestry checker
* Remove unused error
* Write headers outside of function used for authority set changes
* Move justification verification into helper function
* Add documentation suggestions
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Clean up module level documentation a bit
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
84cd93f936
Add Westend & Rococo primitives ( #808 )
...
* Move chain primitives to a sub-folder.
* Update workspace members.
* Extract core parts of polkadot.
* cargo fmt --all
* Remove TODO.
* cargo fmt --all
* Fix crate names.
* Add to the latest API.
* cargo fmt --all
* Add nested lock files to ignore (generated during cargo fmt)
* Fix compilation.
* cargo fmt --all
* Fix ignore pattern.
* Address review comments.
2024-04-10 10:28:37 +02:00
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