From 62d76d08d653e846aff3b5275c207d9aa2223db3 Mon Sep 17 00:00:00 2001 From: Ganesh Vanahalli Date: Thu, 10 Oct 2024 16:02:06 +0530 Subject: [PATCH] check if theres a local target mismatch on go and rust side --- .github/workflows/ci.yml | 52 +++++++++++++++++------------------ arbitrator/jit/src/prepare.rs | 2 +- system_tests/program_test.go | 1 + 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6722b38ed6..d50fe5da59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,21 +140,21 @@ jobs: echo "GOGC=80" >> "$GITHUB_ENV" echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV" - - name: run tests without race detection and path state scheme - if: matrix.test-mode == 'defaults' - env: - TEST_STATE_SCHEME: path - run: | - echo "Running tests with Path Scheme" >> full.log - ${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 20m --cover - - - name: run tests without race detection and hash state scheme - if: matrix.test-mode == 'defaults' - env: - TEST_STATE_SCHEME: hash - run: | - echo "Running tests with Hash Scheme" >> full.log - ${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 20m + # - name: run tests without race detection and path state scheme + # if: matrix.test-mode == 'defaults' + # env: + # TEST_STATE_SCHEME: path + # run: | + # echo "Running tests with Path Scheme" >> full.log + # ${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 20m --cover + + # - name: run tests without race detection and hash state scheme + # if: matrix.test-mode == 'defaults' + # env: + # TEST_STATE_SCHEME: hash + # run: | + # echo "Running tests with Hash Scheme" >> full.log + # ${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 20m - name: run tests with race detection and hash state scheme if: matrix.test-mode == 'race' @@ -164,22 +164,22 @@ jobs: echo "Running tests with Hash Scheme" >> full.log ${{ github.workspace }}/.github/workflows/gotestsum.sh --race --timeout 30m - - name: run redis tests - if: matrix.test-mode == 'defaults' - run: | - echo "Running redis tests" >> full.log - TEST_REDIS=redis://localhost:6379/0 gotestsum --format short-verbose -- -p 1 -run TestRedis ./arbnode/... ./system_tests/... -coverprofile=coverage-redis.txt -covermode=atomic -coverpkg=./... + # - name: run redis tests + # if: matrix.test-mode == 'defaults' + # run: | + # echo "Running redis tests" >> full.log + # TEST_REDIS=redis://localhost:6379/0 gotestsum --format short-verbose -- -p 1 -run TestRedis ./arbnode/... ./system_tests/... -coverprofile=coverage-redis.txt -covermode=atomic -coverpkg=./... - name: create block input json file if: matrix.test-mode == 'defaults' run: | - BLOCK_INPUT_JSON_PATH="${{ github.workspace }}/target/block_input.json" gotestsum --format short-verbose -- -run TestProgramStorage$ ./system_tests/... --count 1 + BLOCK_INPUT_JSON_PATH="${{ github.workspace }}/target/block_input.json" gotestsum --format standard-verbose -- -run TestProgramStorage$ ./system_tests/... --count 1 - - name: run arbitrator prover on block input json - if: matrix.test-mode == 'defaults' - run: | - make build-prover-bin - target/bin/prover target/machines/latest/machine.wavm.br -b --json-inputs="${{ github.workspace }}/target/block_input.json" + # - name: run arbitrator prover on block input json + # if: matrix.test-mode == 'defaults' + # run: | + # make build-prover-bin + # target/bin/prover target/machines/latest/machine.wavm.br -b --json-inputs="${{ github.workspace }}/target/block_input.json" - name: run jit prover on block input json if: matrix.test-mode == 'defaults' diff --git a/arbitrator/jit/src/prepare.rs b/arbitrator/jit/src/prepare.rs index 6c1b0b84de..b766936f3e 100644 --- a/arbitrator/jit/src/prepare.rs +++ b/arbitrator/jit/src/prepare.rs @@ -68,6 +68,6 @@ pub fn prepare_env(json_inputs: PathBuf, debug: bool) -> eyre::Result { .insert(*module_hash, module_asm.as_vec().into()); } } - + eprintln!("localTarget {}", local_target()); Ok(env) } diff --git a/system_tests/program_test.go b/system_tests/program_test.go index 92aeddaf53..1f195630a6 100644 --- a/system_tests/program_test.go +++ b/system_tests/program_test.go @@ -429,6 +429,7 @@ func storageTest(t *testing.T, jit bool) { if blockInputJSONPath != "" { recordBlock(t, receipt.BlockNumber.Uint64(), builder, []ethdb.WasmTarget{rawdb.TargetWavm, rawdb.LocalTarget()}, blockInputJSONPath) } + log.Info("printing debug info", "localTarget", rawdb.LocalTarget()) } func TestProgramTransientStorage(t *testing.T) {