Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp(ibc-testkit): revamp mock testing framework #1109

Merged
merged 50 commits into from
May 3, 2024

Commits on Feb 7, 2024

  1. imp(testkit): Mock IBC context with basecoin-store types (#1068)

    * non empty default CommitmentPrefix
    
    * update ibc mock client types
    
    * fix tests for updated mock types
    
    * generalize MockContextConfig::into
    
    * rm clone from MockContext
    
    * add with_{client,consensus}_state
    
    * add blocks_since in utils.rs
    
    * client takes host timestamp by default
    
    * refactor relayer context test
    
    * fix few tests
    
    * add ibc-query and basecoin-store deps
    
    * add basecoin-store in mock ibc context
    
    * refactor for updated mock ibc context
    
    * imp timeout test
    
    * public git commit as dep source
    
    * fix spelling
    
    * update MockClient types
    
    * fix failing tests
    
    * rm unused utils and deps
    
    * fix cargo doc lint
    
    * use ibc host paths in mock context
    
    * rm redundant curly brackets
    
    ---------
    
    Co-authored-by: Farhad Shabani <farhad.shabani@gmail.com>
    rnbguy and Farhad-Shabani committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    1c3ba50 View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2024

  1. Configuration menu
    Copy the full SHA
    3d11dfc View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2024

  1. imp(ibc-testkit): generalize Host for MockContext (#1107)

    * fix semantic conflict
    
    * happy clippy
    
    * fix next_consensus_state impl
    
    * update prev_consensus_state impl
    
    * use self.block_time over const
    
    * use constant timestamp over dynamic now
    
    * add new host impls
    
    * changes to ibc-testkit
    
    * rm deprecated methods
    
    * refactor tests
    
    * public fields for tm block params
    
    * forged client header update test
    
    * add todo comment
    
    * minor refactor
    
    * refactor tests
    
    * builder type for light client state
    
    * minor refactor
    
    * refactor tests
    
    * code opt
    
    * rename host structs
    
    * renamings
    
    * refactor tendermint host
    
    * mv year_2023 to utils
    
    * refactor the new tests
    
    * test malicious adjacent header update
    
    * fix tests
    
    * add changelog
    
    * rm unused chain_revision_number
    
    * add doc string for year_2023
    
    * rename to query_latest_block
    rnbguy committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    74203fb View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Configuration menu
    Copy the full SHA
    cb6ca8b View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. feat(ibc-testkit): revamp MockContext with chain capabilities (#1135)

    * imp: impl ctxs on MockIbcStore
    
    * fix: set update_meta whenever build light client
    
    * imp: generate_client_state should take latest_height
    
    * imp: remove unnecessary latest_client_states method
    
    * refactor: migrate host relevant fields/methods
    
    * fix: get back validate_self_client
    
    * imp: bring context types up under src
    
    * rm default for CommitmentPrefix
    
    * rm default height and timestamp impl for TestBlock
    
    * default MockStore
    
    * AnyClient and AnyConsensus state in MockIbcStore
    
    * at least one consensus state when bootstrapping light client
    
    * revision number in MockIbcStore
    
    * advance height in MockIbcStore
    
    * sync host and ibc store advance in conext
    
    * add host params to build host
    
    * update host trait
    
    * convenient type generics for host associated types
    
    * update MockHost
    
    * return existing block header with correct timestamp
    
    * update TendermintHost
    
    * update MockGenericContext impl
    
    * update mock context building
    
    * add implied trait bounds
    
    * refactor method
    
    * rm redundant imports and impl
    
    * call advance_block on context
    
    * update MockContext tests
    
    * rm ClientStateCommon
    
    * use HostParams to build a host
    
    * rm using max_history_size
    
    * update few tests
    
    * ignore failing tests
    
    * clippy::use_self
    
    * clippy::flat_map_option
    
    * clippy::cloned_instead_of_copied
    
    * clippy::redundant_clone
    
    * clippy::redundant_type_annotations
    
    * clippy::as_underscore
    
    * disable slow testcase
    
    * prune old host consensus state
    
    * prune host consensus history in fixture
    
    * enable ignored test
    
    * return client_id in fixture
    
    * fix and enable failing test
    
    * avoid Arc and Mutex
    
    * fix doc build
    
    * refactor host trait and impls
    
    * into over Self::from
    
    * fix msrv
    
    * explicit relative or global path for pub use
    
    * clippy::map_identity
    
    * clippy::inconsistent_struct_constructor
    
    * clippy::std_instead_of_core
    
    * use commitment_root for block generation
    
    * rename consensus_states to host_consensus_states
    
    * use basecoin proof specs
    
    * update tests
    
    * imp: add history() under TestHost
    
    * chore: add docstring for some of methods under TestHost
    
    * update TestHost trait
    
    * update MockHost and TendermintHost
    
    * add MockGenericContext::generate_genesis_block
    
    * update MockContextConfig
    
    * update tests
    
    * update remaining tests
    
    * rm comments and rename test
    
    * rm HostParams
    
    ---------
    
    Co-authored-by: Farhad Shabani <farhad.shabani@gmail.com>
    rnbguy and Farhad-Shabani committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    5bdab7c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b9173d View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    05ea5fa View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. imp(ibc-testkit): Tendermint proof verifications via integration test (

    …#1146)
    
    * test tmclient proof verification
    
    * use ClientStateConfig directly
    
    * rm MockClientConfig
    
    * use basecoin store proofspec as default
    
    * update tests
    
    * use merkle storage in MockContext
    
    * fix ProofSpecs size
    
    * refactor MockIbcStore to perform begin_block and end_block
    
    * simpler proof verification test
    
    * use ValidationContext::commitment_prefix()
    
    * nits
    
    * refactor host related trait method
    
    * tendermint host client integration test with proof verification
    
    * rm raw test
    
    * use typed relayer
    
    * add todo for channel integration test
    
    * core over std
    
    * be semantically correct
    
    * add comment for TypedRelayer
    
    * integration test for all pairs
    
    * fix semantic bug
    
    * renames
    
    * add channel management
    
    * channel creation in RelayerContext
    
    * add channel creation in integration test
    
    * add test for channel close
    
    * query client_id from connection and channel
    
    * ibc_store_mut
    
    * utils functions for packet relay
    
    * add packet relay integration test
    
    * add comments
    
    * optimize integration utils functions
    
    * serde feature for integration tests
    
    * rm redundant chain_id
    
    * sync clock only on a
    
    * add comment
    
    * imp: place router under MockGenericContext
    
    * nit: add docstring for router
    
    * nits
    
    * rm redundant lint filters
    
    * imp: ditch RelayerContext
    
    * nit: simplify build_client_update_datagram
    
    * refactor integration tests
    
    * add doc strings for TypedRelayerOps
    
    * doc strings for RelayerContext
    
    * mv client_update_ping_pong to tests dir
    
    * rename main_store to multi_store
    
    * update TestHost trait
    
    * update mock and tendermint hosts
    
    * update relayer functions
    
    * nits
    
    * renames and comments
    
    * add comments for return values in relayer ops
    
    * imp: simplify into_header
    
    ---------
    
    Co-authored-by: Farhad Shabani <farhad.shabani@gmail.com>
    rnbguy and Farhad-Shabani committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    2acb2fa View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. rm prune_block_till

    rnbguy committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    9e5b53c View commit details
    Browse the repository at this point in the history
  2. apply suggestions from code review

    Co-authored-by: Sean Chen <seanchen11235@gmail.com>
    Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
    rnbguy and seanchen1991 committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    c49a2c2 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. rename context structs

    rnbguy committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    dedd5f6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    36eccc0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4757bdb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    06963b9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b6f9622 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ccaafa1 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Configuration menu
    Copy the full SHA
    4804754 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    13ec2f0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    934288a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0c80b62 View commit details
    Browse the repository at this point in the history
  5. fallible ProofSpecs conversion

    rnbguy committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    1b6dc16 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4d1f38c View commit details
    Browse the repository at this point in the history
  7. use ExtClientValidationContext

    rnbguy committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    17706dd View commit details
    Browse the repository at this point in the history
  8. fix links in doc comments

    rnbguy committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    1367864 View commit details
    Browse the repository at this point in the history
  9. fix import order

    rnbguy committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    0ada623 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Configuration menu
    Copy the full SHA
    443a2de View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. Merge branch 'main' into feat/refactor-testkit

    Signed-off-by: Rano | Ranadeep <ranadeep@informal.systems>
    rnbguy committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    91dd2ca View commit details
    Browse the repository at this point in the history
  2. fix semantic conflicts

    rnbguy committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    142f8f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2024

  1. Configuration menu
    Copy the full SHA
    03552ce View commit details
    Browse the repository at this point in the history
  2. rm ConsensusStateConverter

    rnbguy committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    950c43c View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    b391663 View commit details
    Browse the repository at this point in the history
  2. ibc-query as workspace deps

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    d77cd52 View commit details
    Browse the repository at this point in the history
  3. update Convertible

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    fc0626b View commit details
    Browse the repository at this point in the history
  4. fix failing test

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    07e8db1 View commit details
    Browse the repository at this point in the history
  5. update changelog entry

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    b18b732 View commit details
    Browse the repository at this point in the history
  6. add comments

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    d8e65c6 View commit details
    Browse the repository at this point in the history
  7. rm absolute import

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    8d47a2a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    20dd42c View commit details
    Browse the repository at this point in the history
  9. infallible try_into

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    b0d3943 View commit details
    Browse the repository at this point in the history
  10. update method names

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    e092359 View commit details
    Browse the repository at this point in the history
  11. add unused variable names

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    5cb831b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0deecd3 View commit details
    Browse the repository at this point in the history
  13. add comments

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    5900434 View commit details
    Browse the repository at this point in the history
  14. update docstrings

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    b8db190 View commit details
    Browse the repository at this point in the history
  15. rm should never fail comment

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    d8fe3d4 View commit details
    Browse the repository at this point in the history
  16. update adr

    rnbguy committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    6e7172d View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Configuration menu
    Copy the full SHA
    5af3f13 View commit details
    Browse the repository at this point in the history
  2. fix compilation

    rnbguy committed May 2, 2024
    Configuration menu
    Copy the full SHA
    c264ae8 View commit details
    Browse the repository at this point in the history
  3. fix failing test

    rnbguy committed May 2, 2024
    Configuration menu
    Copy the full SHA
    7704550 View commit details
    Browse the repository at this point in the history
  4. docs: ADR-009 to revamp testing framework (#1157)

    * draft adr 009
    
    * update adr-009
    
    * apply suggestions from pr review
    
    Co-authored-by: Sean Chen <seanchen11235@gmail.com>
    Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
    
    * use numbers list for sub-proposal titles
    
    Co-authored-by: Sean Chen <seanchen11235@gmail.com>
    Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
    
    * links to validation and execute context
    
    Co-authored-by: Sean Chen <seanchen11235@gmail.com>
    Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
    
    * apply suggestion from pr review
    
    * add links to impls
    
    * update comment
    
    * markdown format
    
    * update adr
    
    * use TestContext
    
    * update comment
    
    * apply suggestions from code review
    
    Co-authored-by: Sean Chen <seanchen11235@gmail.com>
    Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
    
    * markdown format
    
    * update method names
    
    * fix cargo doc error
    
    ---------
    
    Signed-off-by: Rano | Ranadeep <ranadip.bswas@gmail.com>
    Co-authored-by: Sean Chen <seanchen11235@gmail.com>
    rnbguy and seanchen1991 committed May 2, 2024
    Configuration menu
    Copy the full SHA
    e42acc9 View commit details
    Browse the repository at this point in the history