Skip to content

Commit

Permalink
check if theres a local target mismatch on go and rust side
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Oct 10, 2024
1 parent 70c5b3f commit 62d76d0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion arbitrator/jit/src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ pub fn prepare_env(json_inputs: PathBuf, debug: bool) -> eyre::Result<WasmEnv> {
.insert(*module_hash, module_asm.as_vec().into());
}
}

eprintln!("localTarget {}", local_target());
Ok(env)
}
1 change: 1 addition & 0 deletions system_tests/program_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 62d76d0

Please sign in to comment.