Skip to content
  1. Apr 10, 2024
    • Hernando Castano's avatar
      Make Test Helpers `no_std` Compatible (#823) · eb7c96ba
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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
      eb7c96ba
    • Svyatoslav Nikolsky's avatar
      Sync Westend to Millau (#824) · d749bc3a
      Svyatoslav Nikolsky authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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
      d749bc3a
    • Svyatoslav Nikolsky's avatar
      Make finality verifier pallet instantiable (#825) · 249a8f73
      Svyatoslav Nikolsky authored and Bastian Köcher's avatar Bastian Köcher committed
      * make finality verifier pallet instantiable
      
      * try to fix benchmarks
      
      * fix benchmarks compilation
      249a8f73
    • Hernando Castano's avatar
      Clean Finality Verifier Pallet (#804) · d8852fd1
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      
      
      * 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: default avatarTomasz Drwięga <[email protected]>
      
      * Clean up module level documentation a bit
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      d8852fd1
    • Hernando Castano's avatar
      Simplify operational extrinsics (#810) · 47aa6634
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * Simplify operational extrinsics
      
      * Remove old extrinsics from finality verifier
      47aa6634
    • Hernando Castano's avatar
      Move Storage Parser from Bridge Pallet (#793) · 51db99ea
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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
      51db99ea
    • Hernando Castano's avatar
      Bump Substrate (#796) · f7c3bd4e
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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
      f7c3bd4e
    • Hernando Castano's avatar
      Unify Substrate Bridge Pallet with Finality Verifier (#783) · 6cfd8778
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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
      6cfd8778
    • Tomasz Drwięga's avatar
      Disable cache in CI builds. (#772) · 7602d910
      Tomasz Drwięga authored and Bastian Köcher's avatar Bastian Köcher committed
      * Disable cache.
      
      * Fix tests.
      
      * Fix clippy?
      
      * cargo fmt --all
      7602d910
    • Hernando Castano's avatar
      Use No-Op Ancestry Checker (#755) · 658e4e9b
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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
      658e4e9b
    • Hernando Castano's avatar
      Stop counting invalid requests towards rate limit (#765) · c00a47d5
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      c00a47d5
    • Hernando Castano's avatar
      Finality Pallet Rate Limiter (#720) · d8352335
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * Add simple rate limiting mechanism
      
      * Add tests
      
      * Small test cleanup
      
      * Hook MaxRequests into runtimes
      d8352335
    • Hernando Castano's avatar
      Stop Importing Full Header Chain (#707) · fb7c1912
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * 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.
      fb7c1912
    • Hernando Castano's avatar
      Add Logging to Finality Verifier Pallet (#702) · 51364e73
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * Add some logging to the finality verifier pallet
      
      * Add finality target to happy path log
      51364e73
    • Hernando Castano's avatar
      Wire Finality Verifier Pallet Into Runtimes (#696) · 8c7d0ca3
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * Add Finality Verifier pallet to runtimes
      
      * Implement simple ancestry checker
      
      * Use the new checker in runtimes
      
      * Remove unused import warning
      
      * Bump max allowed ancestry proof size
      
      * Add a few optimization suggestions when verifying ancestry
      
      * Use session length as upper bound for ancestry proof size
      
      * Remove unused time units
      8c7d0ca3
    • Tomasz Drwięga's avatar
      Add finality verifier test with different validator set id. (#698) · 4719cb22
      Tomasz Drwięga authored and Bastian Köcher's avatar Bastian Köcher committed
      
      
      * Add test for invalid set id.
      
      * cargo fmt --all
      
      * Update modules/finality-verifier/src/lib.rs
      
      Co-authored-by: default avatarHernando Castano <[email protected]>
      
      Co-authored-by: default avatarHernando Castano <[email protected]>
      4719cb22
    • Hernando Castano's avatar
      Add Unchecked Header Writes to Bridge Pallet (#672) · b921a485
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      
      
      * Add method for unchecked header imports
      
      * Update docs for importing unchecked headers
      
      * Import unchecked headers in HeaderChain implementation
      
      * Fix Clippy warnings
      
      * Move unchecked header import out of Verifier struct
      
      * Clean up unchecked import tests
      
      * Change HeaderChain API to accept iterator of headers
      
      * Use chains of headers in tests
      
      * Remove unused Result return type when appending finalized headers
      
      * Add test which shows that genesis changes are not enacted
      
      * Use initial header's hash for unchecked authority set changes
      
      * Appease Clippy
      
      * Check ancestry before making unchecked writes
      
      * Fix typo
      
      * Fix Clippy warning
      
      * Add note about `ancestry_proof` structure
      
      * Use best hash storage item directly
      
      Co-authored-by: default avatarSvyatoslav Nikolsky <[email protected]>
      b921a485
    • Hernando Castano's avatar
      Migrate Finality Verifier Pallet to FRAME v2 (#669) · be590723
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * Get pallet compiling with FRAME v2
      
      * Get tests compiling
      
      * Stop printing metadata in tests
      
      * Remove more metadata related code
      
      * Remove unecessary storage attribute
      be590723
    • Hernando Castano's avatar
      Finality Verifier Pallet (#629) · ea5d8662
      Hernando Castano authored and Bastian Köcher's avatar Bastian Köcher committed
      * Add skeleton for `pallet-finality-verifier`
      
      * Sketch out implementation for importing finality proofs
      
      * Get pallet compiling
      
      * Introduce skeleton for mock runtime
      
      * Start using real Grandpa types in finality pallet
      
      * Redefine types in header chain primitives crate
      
      * Implement HeaderChain for Substrate bridge pallet
      
      * Plug Substrate Bridge Pallet into verifier mock
      
      * Fix compilation of `header-chain` primitives
      
      * Start writing to base pallet storage
      
      * Add first "cross-pallet" test
      
      * Move keyring primitives used in tests to shared crate
      
      * Stop pulling `std` deps into `no_std` builds
      
      * Revert "Stop pulling `std` deps into `no_std` builds"
      
      This reverts commit f74dd660652f98b7336936d1534a4e63cc9169a5.
      
      * Revert "Move keyring primitives used in tests to shared crate"
      
      This reverts commit b774fa730b2cdc40545afff308a66b0840266001.
      
      * Use new SS58Prefix type in mock
      
      * Start using `bp-test-utils` in finality pallet
      
      * Start using real justification code
      
      * Get a test working with real justification verification
      
      * Add basic tests for invalid proofs
      
      * Get rid of AncestryProof config type
      
      * Add error types to transaction outcome
      
      * Bound number of headers allowed in a single ancestry proof
      
      * Disallow invalid authority sets
      
      * Remove unused items
      
      * Add some documentation
      
      * Get rid of Clippy warnings
      
      * Rename BaseHeaderChain to TransactionVerifier
      
      * Remove unused code
      
      * Make dummy trait implementations more generic
      
      * Fix more Clippy complaints
      
      * Update tests to use fix for duplicate headers
      
      * Fix benchmarking compilation
      
      * Rename TransactionVerifier to InclusionProofVerifier
      ea5d8662