From 916e4834d088c9e1837b0a30e8403095fd8b565e Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Tue, 19 Mar 2024 22:08:54 +1100 Subject: [PATCH] Remove codex_use_hardhat compilation flag (#741) This flag was originally used to change OnChainClock behavior when using hardhat as an ethereum chain source due to a very strange bug which would mark the timestamp of new blocks as one second off the timestamp they should have been. The issue has since been worked around in another manner, and thus this flag is no longer needed. --- .github/workflows/docker-dist-tests.yml | 2 +- build.nims | 6 +++--- codex/conf.nim | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-dist-tests.yml b/.github/workflows/docker-dist-tests.yml index 5ae2e30a..ae1e5e9e 100644 --- a/.github/workflows/docker-dist-tests.yml +++ b/.github/workflows/docker-dist-tests.yml @@ -24,7 +24,7 @@ jobs: name: Build and Push uses: ./.github/workflows/docker-reusable.yml with: - nimflags: '-d:disableMarchNative -d:codex_enable_api_debug_peers=true -d:codex_enable_proof_failures=true -d:codex_use_hardhat=false -d:codex_enable_log_counter=true' + nimflags: '-d:disableMarchNative -d:codex_enable_api_debug_peers=true -d:codex_enable_proof_failures=true -d:codex_enable_log_counter=true' nat_ip_auto: true tag_latest: ${{ github.ref_name == github.event.repository.default_branch || startsWith(github.ref, 'refs/tags/') }} tag_suffix: dist-tests diff --git a/build.nims b/build.nims index 11eec387..33d7b623 100644 --- a/build.nims +++ b/build.nims @@ -25,13 +25,13 @@ task codex, "build codex binary": buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE" task testCodex, "Build & run Codex tests": - test "testCodex", params = "-d:codex_enable_proof_failures=true -d:codex_use_hardhat=true" + test "testCodex", params = "-d:codex_enable_proof_failures=true" task testContracts, "Build & run Codex Contract tests": test "testContracts" task testIntegration, "Run integration tests": - buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE -d:codex_enable_proof_failures=true -d:codex_use_hardhat=true" + buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE -d:codex_enable_proof_failures=true" test "testIntegration" task build, "build codex binary": @@ -75,7 +75,7 @@ task coverage, "generates code coverage report": if f.endswith(".nim"): nimSrcs.add " " & f.absolutePath.quoteShell() echo "======== Running Tests ======== " - test "coverage", srcDir = "tests/", params = " --nimcache:nimcache/coverage -d:release -d:codex_enable_proof_failures=true -d:codex_use_hardhat=true" + test "coverage", srcDir = "tests/", params = " --nimcache:nimcache/coverage -d:release -d:codex_enable_proof_failures=true" exec("rm nimcache/coverage/*.c") rmDir("coverage"); mkDir("coverage") echo " ======== Running LCOV ======== " diff --git a/codex/conf.nim b/codex/conf.nim index 7bf176da..8ec99041 100644 --- a/codex/conf.nim +++ b/codex/conf.nim @@ -59,7 +59,6 @@ proc defaultDataDir*(): string = const codex_enable_api_debug_peers* {.booldefine.} = false codex_enable_proof_failures* {.booldefine.} = false - codex_use_hardhat* {.booldefine.} = false codex_enable_log_counter* {.booldefine.} = false DefaultDataDir* = defaultDataDir()