Commit Graph

221 Commits

Author SHA1 Message Date
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 Waszczyk 051030374a Add backbone configuration of cargo-spellcheck (#924)
* feat(config): add backbone configuration of cargo-spellcheck

* feat(config): try to narrow a source code to analysis

* feat(config): try to narrow a source code to analysis via find command

* Update .github/workflows/lint.yml

;-)

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update .github/workflows/lint.yml

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Use bash.

* Fix spelling.

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky ebf9ae7546 do not panic if pallet is not yet initialized (#937) 2024-04-10 10:28:37 +02:00
Tomasz Drwięga 816fb36107 Truncate output in logs. (#930) 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
Tomasz Drwięga 234e6b95e4 Update weights (#898)
* New weights.

* Fix test.

* cargo fmt --all
2024-04-10 10:28:37 +02:00
Hernando Castano bca83fd020 Westend<>Rococo Headers Relay (#875)
* Add modules for Rococo<>Westend header sync

* Use mock Westend and Rococo finaltiy tx calls

* Add Westend<>Rococo variants to `init_bridge`

* Add Westend<>Rococo variants to `relay_headers`

* Simplify the Rococo and Westend signing params

* Add `submit_finality_proof` mock Call variant

* Add note to more closely match `initialize` Call variant

* Accidentally committed `cargo-expand`ed code 🤦

* Add `initialize` Call variant to Rococo mock

* Fix call enums.

* Add explainatory comment.

* clippy.

* Add issue number.

* De-duplicate metrics customisation.

* Add comments to Rococo/Westend runtimes.

* Add scale-encoding compatibility test.

* Fix tests.

* Clippy.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
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
Tomasz Drwięga aa17c272f1 Support more than u8::max_value GRANDPA validators (#896)
* Support moar validators.

* Update weights script.

* Use correct type for benchmarking accounts

* Use package name instead of manifest path

Co-authored-by: Hernando Castano <hernando@hcastano.com>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga f92449a461 Grandpa Pallet Pruning (#890)
* Pruning.

* Add tests.

* Address review.
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 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
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 1928e2b870 Use Vote Ancestries Directly in Weight Calculations (#862)
* Use more accurate weight calculation in declared weight

* Remove session length and validator set size config constants

* Remove config params from mock

* Allow specifying total number of votes-ancestries per justification

* Change limits used during benchmarking

* Regenerate weights

* Use simplified weight annotation

* Remove comment

* Address leftover TODO

* Prevent possible divide by zero errors

* Use correct argument order in weight declaration
2024-04-10 10:28:37 +02:00
Hernando Castano 025a9cad59 Weights for pallet-bridge-grandpa (#815)
* Add benchmarking skeleton

* Allow runtime to indicate concrete header type for benches

* Set up skeleton for benchmark tests

* Play around with mutating bench header

* Create a working test for benchmarking

* Add benches related to enacting authority set changes

* Add bench for checking effect of prec-commits/vote ancestries

* Use new `no_std` test utils in benchmarks

* Support pallet instances in benchmarking

* Use correct benchmarking instance macro

* Add instance to runtime benchmark helper impl

* Start using new justification creation API

* Allow mock header's number to be specified

* Set up benches with correct fork/depth parameters

* Use new pallet name during runtime bench setup

* Use correct `set_id` in tests

* Limit number of forks as workaround to get tests passing

* Use number of authorities which matches number of forks

* Make sure test post-conditions are checked properly

* Only read `CurrentAuthoritySet` from storage once

* Add combined benchmark for `submit_finality_proof`

* Add bench test

* Introduce config bounds related to justification verification

* Use config consts from pallet in benchmarking

* Return data relevant to benchmarks from helper functions

* Annotate `submit_finality_proof` with autogenerated weights

* Return actual weight after call execution

* Ignore Clippy warnings in bench template

* Update benchmark template

* Use `test-utils` to create test headers

* Clarify that helper is only for messages benches

* Add more documentation to benches

* Update TODOs

* Clarify return types in comment

* Fix pallet name post-merge

* Update NOTE to a TODO item

* Indicate that Config params are max values, not actual values

* Change Config validator count type to be `u32`

* Return decoded justification instead of fields

* Add missing trait bounds for tests

* Correctly issue weight refund

Thanks for spotting this Tomek!

* Update comment

* Add note about SESSION_LENGTH

* Fix benchmarking code
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
Hernando Castano 78a9cdca66 Larger Test Keyring Support (#842)
* Allow creation of authority lists with any number of authorities

* Move keyring helpers into their own module

* Add helper for generating list of test accounts

* Fix import names in tests

* Rename Keyring trait to Signer

* Get list of accounts in a more functional way

* Clarify meaning of `test_keyring` return type

* Use concrete test account type instead of generics

* Make sure voter set contains all authorities which signed off on pre-commits
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
Hernando Castano 1c7b5d1b30 Tunable Justification Generator (#835)
* Add way to create tunable GRANDPA justifications

* Use new function in tests

* Allow multiple authorities on a single fork

* Only store pre-commit targets instead of full ancestry chains

* Rename precommit_header to be more generic

* Push new digest item instead of overriding entire digest

* Ensure that we generate chains with non-zero length

* Extract justification creation parameters into struct

* Appease Clippy
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
Hernando Castano eb7c96ba14 Make Test Helpers no_std Compatible (#823)
* Use `sp-application-crypto` when generating test justifications

* Try to justifications tests compiling

* Try using `ed25519_dalek` for justification creation

* Small cleanup

* Correctly generate a Keypair

The public key didn't correspond to what would be derived
with the given private key.

* Remove enum index hack

* Clean up test account helper functions

* Fix tests in `pallet-finality-verifier`

* Get `pallet-substrate-bridge` tests compiling again

* Use the correct keyring in justification tests

* Clean up Keyring related code a bit

* Appease Clippy

* Remove unused import

* Use keyring variants directly

* Remove unecessary From implementation
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
Svyatoslav Nikolsky 249a8f73ff Make finality verifier pallet instantiable (#825)
* make finality verifier pallet instantiable

* try to fix benchmarks

* fix benchmarks compilation
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
Hernando Castano 47aa6634a2 Simplify operational extrinsics (#810)
* Simplify operational extrinsics

* Remove old extrinsics from finality verifier
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
Hernando Castano 51db99ea79 Move Storage Parser from Bridge Pallet (#793)
* Move storage proof checker to runtime primtives

* Add method for parsing storage proofs

* Use finality-verifier pallet in runtime-common

* Get bridge pallet compiling again

* Use storage prover from bp-runtime in a few more places

* Don't leak `std` items from proof helper into `no-std` builds

* Fix benchmarking compilation

* Remove unused import in fuzzer
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 80533af331 Use globs for workspace members. (#802)
* Add all members.

* Change members to globs.

* Remove runtime-common.
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
Hernando Castano f7c3bd4e08 Bump Substrate (#796)
* Bump Substrate to version used by Polkadot (`5f056830`)

* Use `log` crate for runtime logging

See https://github.com/paritytech/substrate/pull/8128/ for more info.

* Stop using return value from `execute_block`

* Update test weight
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
Hernando Castano 6cfd87783e Unify Substrate Bridge Pallet with Finality Verifier (#783)
* Add relevant storage items from Substrate pallet

* Add function for importing finalized headers to storage

* Remove unused getter functions

* Add GenesisConfig to pallet

* Add initialization extrinsic

* Add operational extrinsic

* Get existing finality verifier tests compiling again

* Add tests for pallet initialization

* Add tests related to pallet's operational status

* Update tests which were using `pallet-substrate-bridge`

* Add tests related to header imports

* Use wrapper function when init-ing some tests

* Add prefix to tests related to rate limiter

* Fix failed compilation related to GenesisConfig

* Add some documentation

* Change some extrinsics to be Operational

* Add public interface to pallet

* Implement runtime APIs for finality-verifier pallet

* Justify use of `expect` when importing headers

* Reject headers with forced changes

* Add weight to initialize extrinsic

* Remove TODO which will be addressed later

* Move succesful import log to correct location

* Expand proof for when `best_finalized` is fetched

* Move check for newer finalized blocks earlier in pipeline

* Rename `ConflictingFork` error to be more generic

* Only compute finality_target's hash once

* Add missing documentation to Runtime APIs

* Add TODO about using `set_id` from `ScheduledChange` digest
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
Hernando Castano 658e4e9b5c Use No-Op Ancestry Checker (#755)
* Use no-op ancestry checker

* Check that current header height is greater than last finalized

* Ensure that incoming headers are strictly greater than last finalized

* Ensure that header numbers always increase in tests
2024-04-10 10:28:37 +02:00
Hernando Castano c00a47d5ca Stop counting invalid requests towards rate limit (#765) 2024-04-10 10:28:37 +02:00
Tomasz Drwięga c3d651d29a Add inspect command to take a look at extrinsics. (#762)
* Add inspect command to take a look at extrinsics.

* cargo fmt --all

* New weight for on-chain remark in tests

* Minor style tweaks.

Co-authored-by: adoerr <0xad@gmx.net>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4a1a990fa6 Message lane integration documentation (#736)
* how-to-integrate-message-lane-module

* added README stub for bridge-runtime-common

* added README stub for pallet-bridge-call-dispatch

* bridge-runtime-common documentation

* call dispatch module documentation

* some fixes

* more fixes

* more fixes

* more fixes

* more fixes for runtime-common/README.md

* more fixes in call-dispatch/README.md

* more fixes in call-dispatch/README.md

* more fixes in call-dispatch/README.md

* more fixes in message-lane/README.md

* more fixes in message-lane/README.md

* Wrap most text at 100 characters

* Clean up some of the formatting

* Fix broken link

* Stop running CI for README changes

* Don't run any CI steps on documentation changes

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
Tomasz Drwięga 82739314a8 Bump substrate in subtree import preparation. (#759) 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 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 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 705a41528f Increase message fee call (#718)
* fn increase_message_fee()

* benchmarks + weights

* - extra lines

* split error
2024-04-10 10:28:37 +02:00
Hernando Castano d835233571 Finality Pallet Rate Limiter (#720)
* Add simple rate limiting mechanism

* Add tests

* Small test cleanup

* Hook MaxRequests into runtimes
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
Hernando Castano fb7c191234 Stop Importing Full Header Chain (#707)
* Make AncestryProof type more flexible

* Only import single finalized header instead of a chain

* Fix unchecked header import tests

* Add option for limiting ancestry proof size

* Update finality verifier Config in runtimes

* Update some documentation

* Fix Clippy warning

* Allow AncestryChecker to return proof size

Stops us from abusing the `Size` trait

* Remove Size impl for Vec<T>

* Remove size contraints for ancestry proofs

With different proof types its unclear how to "size" should be interpreted,
so we remove this requirement all together to avoid confusion.
2024-04-10 10:28:37 +02:00