ipld-eth-db-validator/test
Abdul Rabbani d111dd85db
Feature/update go geth sharding (#13)
* Upgrade Geth, Go and add CICD

* update ipld-eth-server version

* Track validation progress on a channel

* Add integration tests

* Setup validator config and update instructions to run tests locally

* Update readme and tests

* Update test to use v4 Infrastructure

* Inlcude the env file

* Fix config file write

* Update DB configuration

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
Co-authored-by: Ashwin Phatak <ashwinpphatak@gmail.com>
2022-06-03 09:28:02 -04:00
..
contract Feature/update go geth sharding (#13) 2022-06-03 09:28:02 -04:00
helper.go Feature/update go geth sharding (#13) 2022-06-03 09:28:02 -04:00
integration_suite_test.go Add integration test and dynamic txn unit test. 2022-01-20 18:52:01 +05:30
integration_test.go Feature/update go geth sharding (#13) 2022-06-03 09:28:02 -04:00
README.md Feature/update go geth sharding (#13) 2022-06-03 09:28:02 -04:00

Test Instructions

Setup

  • For running integration tests:

    • Clone stack-orchestrator and go-ethereum repositories.

    • Checkout v4 release in go-ethereum repo.

      # In go-ethereum repo.
      git checkout v1.10.18-statediff-4.0.2-alpha
      
    • Checkout working commit in stack-orchestrator repo.

      # In stack-orchestrator repo.
      git checkout 418957a1f745c921b21286c13bb033f922a91ae9
      

Run

  • Run unit tests:

    # In ipld-eth-db-validator root directory.
    ./scripts/run_unit_test.sh
    
  • Run integration tests:

    • In stack-orchestrator repo:

      • Create config file:

        cd helper-scripts
        
        ./create-config.sh
        

        A config.sh will be created in the root directory.

      • Update/Edit the config file config.sh:

        #!/bin/bash
        
        # Path to go-ethereum repo.
        vulcanize_go_ethereum=~/go-ethereum
        
        # Path to contract folder.
        vulcanize_test_contract=~/ipld-eth-db-validator/test/contract
        
        db_write=true
        ipld_eth_server_db_dependency=access-node
        go_ethereum_db_dependency=access-node
        
        connecting_db_name=vulcanize_testing_v4
        
      • Run stack-orchestrator:

        # In stack-orchestrator root directory.
        cd helper-scripts
        
        ./wrapper.sh \
        -e docker \
        -d ../docker/latest/docker-compose-db.yml \
        -d ../docker/local/docker-compose-go-ethereum.yml \
        -d ../docker/local/docker-compose-contract.yml \
        -v remove \
        -p ../config.sh
        
    • Run tests:

      # In ipld-eth-db-validator root directory.
      ./scripts/run_integration_test.sh