ci: get the failing CI pipeline green#104
Open
km631 wants to merge 14 commits into
Open
Conversation
The peer exposed-wrapper batch builder computed `rel` but never used it (include paths come straight from path.relative per file), tripping eslint no-unused-vars and failing the lint job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The test jobs never built the patched -oz-tron FullNode.jar the TRE harness gates on, so run-tests-parallel aborted at pre-flight. Add a build-tre-jar job (cached + uploaded as an artifact) that tests, tests-upgradeable and coverage download. Also compile the corpus once in run-tests-parallel.sh before fanning out (workers use --no-compile and artifacts are gitignored), and copy the upgradeable peer to lib/tron-contracts to match the remapping. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Several contracts use the require(cond, CustomError()) overload, which only compiles via the IR pipeline. forge test passes --via-ir explicitly, but halmos runs a bare forge build and failed; set via_ir in the default profile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The fv/ formal-verification subsystem was inherited from upstream OZ and referenced renamed/absent contracts: fix the ERC721 patch path (TRC721), drop the account-abstraction patch/harness/specs (no such contracts in this fork), and rename harnesses/specs/methods ERC->TRC, EIP712->TIP712. Also wire compile:harnesses to a dedicated batch config (BATCHES env + fv/harness-batches.config.cjs) so it compiles the harnesses instead of silently compiling contracts/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Python 3.12+ rejects java-tron's FullNode.jar in zipfile with 'Overlapped entries (possible zip bomb)'; the ubuntu-latest system python is 3.12 so build-tre-fork.sh's repack failed. Pin 3.11 for the build-tre-jar job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pinning Python 3.11 didn't help — the 'possible zip bomb' overlap check is backported to all maintained CPython branches (3.11.15 included), and java-tron's FullNode.jar has a duplicate META-INF/LICENSE. build-jar.sh (fetched from hardhat-tron, not ours) repacks via zipfile and dies. Inject a sitecustomize.py on PYTHONPATH from build-tre-fork.sh that clears each entry's _end_offset so the guard is skipped (the repack already de-dupes by name). Revert the now-useless 3.11 pin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tests deploy $<X> hardhat-exposed wrappers, but contracts-exposed/ is gitignored (generated, not committed) and the tron compile runs SKIP_EXPOSED=1, so on a fresh CI checkout the wrappers don't exist — every $<X> deploy failed with 'Artifact not found' (tests: 170 fail, tests-upgradeable: 192 fail). Run exposed:regen (stock solc) before the compile in run-tests-parallel.sh when contracts-exposed/ is absent, so both jobs build the wrappers first. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Compilation (~8 min: exposed:regen + tron batches) is a pure function of the contract sources, compiler config and tron-solc version. Cache artifacts/ + contracts-exposed/ keyed on a hash of those (no restore-keys — a partial hit would test stale bytecode) and set SKIP_COMPILE on a hit so run-tests-parallel reuses them. tests-upgradeable caches post-transpile under a distinct key. Unlike the jar (one stable blob shared by 3 jobs, hence cache+artifact), each test corpus differs, so a per-job actions/cache fits better. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test:pragma recompiles every contract individually to validate its pragma range — pure contract work that ran on every test run. Gate it on the compile cache: a hit means the corpus is byte-identical to a state where pragma already passed, so test-only changes now do zero compilation. Still runs on contract changes (cache miss). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…7913 The ERC-7913 P256 cases passed signMessage().serialized (65 bytes, r||s||v), but TRC7913P256Verifier requires exactly r||s (0x40) — the spurious recovery byte made it reject valid signatures, failing the 4 positive cases. Build the 64-byte form directly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ble builds The proxy-test skip-list still had the upstream path proxy/ERC1967/ERC1967Proxy.test.js; the fork's file is proxy/TRC1967/TRC1967Proxy.test.js. So after the transpiler strips proxies it wasn't skipped and tried to deploy the removed TRC1967Proxy/TRC1967ProxyUnsafe (23 failures). Fix the path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
solidity-coverage recorded 0/3561 hits. Root cause: hardhat/tron-artifact-suffix.js eagerly accessed hre.ethers at HRE construction to wrap deployContract, binding hardhat-ethers to the pre-coverage provider — so the suite ran on a VM solidity-coverage never hooked via attachToHardhatVM. Gate that shim on a tron network (mirroring the bridge it supports) so it's inert under coverage. Also drive the coverage compile down the legacy pipeline where solidity-coverage attributes hits: defaultNetwork=hardhat, solc 0.8.28 + viaIR off (0.8.27+ compiles require(cond,CustomError()) in legacy), and exclude the one $TRC7739Mock wrapper that stack-too-deeps. Validated: TRC20.sol 100%, 126/126 passing (was 0 hits). TVM deploy pipeline untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…overage) With hardhat coverage now collecting hits on the in-process EVM, ~50 TVM-specific tests failed there. Add feature-detected EVM fallbacks (TVM path preserved; gated on receipt.internalTransactions presence or network.config.tron) for Clones/ProxyAdmin/UUPSUpgradeable (CREATE address via staticCall/AdminChanged event), AccessManager (FailedCall vs revertedWithoutReason) and sanity (block-height >/>=). Tag the genuinely TVM-only cases [skip-on-coverage] — the TVM 0x41 CREATE2 prefix is hardcoded in Create2/RelayedCall/Clones predict (no EVM equivalent), and $TRC7739*Mock wrappers are excluded under coverage. Result: full coverage run is 6481 passing / 10 pending / 0 failing, ~95% statement coverage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the failing CI jobs across the
checksandformal verificationworkflows. Opened to verify the fixes pass in CI.checksrelbinding intron-batches.config.cjs(eslintno-unused-vars).-oz-tronFullNode.jarthat the TRE harness gates on was never built, sorun-tests-parallel.shaborted at pre-flight. Added a cachedbuild-tre-jarjob that uploads the jar as an artifact;tests,tests-upgradeableandcoveragenow download it. Also:run-tests-parallel.shbefore fanning out (workers run--no-compile,artifacts/is gitignored, andtranspile.shdeletes it) —SKIP_COMPILE=1reuses artifacts locally.lib/tron-contractsto match the@openzeppelin/tron-contracts/remapping (waslib/openzeppelin-contracts). Validated end-to-end: transpile + full tron compile = 571 artifacts.formal verificationfv/Certora suite was inherited from upstream OZ and referenced renamed/absent contracts. Fixed the ERC721 patch path (TRC721), dropped the account-abstraction patch/harness/specs (no such contracts in this fork), and renamed harnesses/specs/methodsERC→TRC,EIP712→TIP712. Wiredcompile:harnessesto a dedicated batch config so it actually compiles the harnesses (19 artifacts via tron-solc) instead of silently compilingcontracts/.via_ir = trueinfoundry.tomlso a bareforge buildcompiles therequire(cond, CustomError())overload.Not included
hardhat coveragecan't run against this stack (solidity-coverage records 0 hits under the mandatory viaIR pipeline; collection is VM-hook-bound to an in-process EVM). Left as-is pending a separate decision.Validation done locally
make -C fv apply,npm run compile:harnesses(19 harness artifacts), forge harness compile, transpile +npm run compileon the upgradeable output (571 artifacts),forge build --via-ir,npm run lint, andactionlinton the workflow — all green.