ipld-eth-server/test
Michael fc0d7a6dd6
Cerc refactor (#193)
* cerc refactor waiting on unpublished dependencies

* cerc refactor updates for dependencies

* Describe imports got removed

* cleaning up more vulcanize refs in ci/cd

* another test lost Describe imports

* another test lost Describe imports... not caught in go build -a???

* more cerc-io migrations to utilize new git.vdb.to gitea instance

* switching back to github for running unit test

* first try at git.vdb.to as conatiner repository

* targeted tag was incomplete
2022-09-20 11:52:06 -04:00
..
contract Run CI tests using stack-orchestrator 2022-05-04 13:05:48 +05:30
direct_proxy_integration_test.go Cerc refactor (#193) 2022-09-20 11:52:06 -04:00
helper.go Add integration tests for service to fill indexing gap 2022-04-21 17:03:37 +05:30
integration_suite_test.go Upgrade geth-statediff to version v1.10.11-statediff-0.0.27 2021-10-21 14:56:29 +05:30
integration_test.go Cerc refactor (#193) 2022-09-20 11:52:06 -04:00
README.md Optimize eth_getBlockByNumber and eth_getBlockByHash implementations (#187) 2022-08-23 12:42:19 +05:30
watch_address_integration_test.go Cerc refactor (#193) 2022-09-20 11:52:06 -04:00

Test Insructions

Setup

  • Clone stack-orchestrator, ipld-eth-db go-ethereum repositories.

  • Checkout v4 release in ipld-eth-db repo.

    # In ipld-eth-db repo.
    git checkout v4.2.1-alpha
    
  • Checkout v4 release in go-ethereum repo.

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

    # In stack-orchestrator repo.
    git checkout f2fd766f5400fcb9eb47b50675d2e3b1f2753702
    

Run

  • Run unit tests:

    # In ipld-eth-server 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 generated config file with:

      #!/bin/bash
      
      # Path to ipld-eth-server repo.
      vulcanize_ipld_eth_db=~/ipld-eth-db/
      
      # Path to go-ethereum repo.
      vulcanize_go_ethereum=~/go-ethereum/
      
      # Path to ipld-eth-server repo.
      vulcanize_ipld_eth_server=~/ipld-eth-server/
      
      # Path to test contract.
      vulcanize_test_contract=~/ipld-eth-server/test/contract
      
      genesis_file_path='start-up-files/go-ethereum/genesis.json'
      db_write=true
      eth_forward_eth_calls=false
      eth_proxy_on_error=false
      eth_http_path="go-ethereum:8545"
      
    • Run stack-orchestrator:

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

      # In ipld-eth-server root directory.
      ./scripts/run_integration_test.sh
      
    • Update stack-orchestrator config.sh file:

      #!/bin/bash
      
      # Path to go-ethereum repo.
      vulcanize_go_ethereum=~/go-ethereum/
      
      # Path to ipld-eth-server repo.
      vulcanize_ipld_eth_server=~/ipld-eth-server/
      
      # Path to test contract.
      vulcanize_test_contract=~/ipld-eth-server/test/contract
      
      genesis_file_path='start-up-files/go-ethereum/genesis.json'
      db_write=false
      eth_forward_eth_calls=true
      eth_proxy_on_error=false
      eth_http_path="go-ethereum:8545"
      
    • Stop the stack-orchestrator and start again using the same command

    • Run integration tests for direct proxy fall-through of eth_calls:

      ./scripts/run_integration_test_forward_eth_calls.sh