Skip to content

build: vendor the CREDITSCOM maven artifacts and build without CREDITSCOM - #7

Merged
EnzinoBB merged 1 commit into
build/reproducible-1518from
build/independent-deps
Oct 13, 2026
Merged

EnzinoBB merged 1 commit into
build/reproducible-1518from
build/independent-deps

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Make the build of executor build 1518 independent of anything CREDITSCOM hosts.

What came from CREDITSCOM

A cold, non-quiet debug run (38397547299, -B without -q, no Maven cache) showed that, of the three raw.github.com/creditscom/*/mvn-repo/ repositories the poms declare, only the thrift-api-client branch served anything the build used:

  • com.credits.client:general:1.2 (jar, pom)
  • com.credits.client:node_client:1.4 (jar, pom)

Every other lookup there was a 404. That includes the sc-api and contract-executor branches and the jblake2 RELEASE metadata, and those lookups cost about 30 s of timeouts. The parent com.credits.client:api-client:none comes from the local install of EnzinoBB/thrift-api-client. The workflow also checked out CREDITSCOM/smart-contract-api.

Changes

  • third-party/mvn-repo/: those four files, copied byte for byte with their .sha1/.md5 from the mvn-repo branch of CREDITSCOM/thrift-api-client (commit 8ebdd22, 2019). The checksums are verified. Total size is 2.2 MB.
  • third-party/maven-settings.xml: a mirror vendored with mirrorOf *,!central that points to file://${env.VENDORED_MAVEN_REPO}. Every repository except Maven Central therefore resolves only from the vendored directory. The poms are unchanged.
  • build.yml:
    • every mvn call, including the thrift-api-client and smart-contract-api builds, uses -s third-party/maven-settings.xml
    • smart-contract-api is checked out from EnzinoBB/smart-contract-api at the same commit 677c567f (now also branch build/reproducible-1518 there)
    • a new Maven cache key, so the first run resolved everything through the mirror
    • Maven runs without -q, and a new step fails the job if the Maven log mentions creditscom or raw.github
  • BUILDING.md, third-party/README.md: document the above.

Validation

  • Green runs on build/independent-deps: 38397978439 (cold cache), 38398402279, 38399252256. Each log shows general-1.2 and node_client-1.4 "Downloaded from vendored: file://…/third-party/mvn-repo/…", plus downloads from central, and nothing else.
  • The "Compare with the mainnet executor" output is the same as at eecd2b23 (run 38382529108): 14050/14058 and 40/42 classes identical, with the same 8 + 2 differing classes. Only the jar names change (-b58 becomes -b59, the commit count).
  • Comparing the uploaded artifacts of 38399252256 with those of 38382529108 directly: 14058/14058, 42/42, 55/55 and 40/40 classes are byte-identical. Only MANIFEST.MF and git.properties differ (commit id and count).

Known pre-existing issue (not changed here)

The module-info.class of the jar-with-dependencies assemblies (*-v0.8.4-b<N>.jar) is not deterministic. maven-assembly-plugin 2.2-beta-5 sometimes adds the dependency set before the project classes. The first entry wins, so the fat jars sometimes carry sc-api-internal's or org.eclipse.osgi's descriptor:

  • Runs 38397978439 and 38398402279 got the wrong descriptor; 38399252256, on the same commit with the same cache, got the right one.
  • The unchanged eecd2b23 code also got the wrong one in debug run 38397547299.

This is the nondeterminism noted in 3abfffed. The compare step cannot show it, because the release's module-info.class differs anyway.

Still on CREDITSCOM

Only the verification step that downloads the mainnet release tarball (CREDITSCOM/node releases) to compare classes. It is the reference being compared against and is not needed to build.

🤖 Generated with Claude Code

…SCOM

The only artifacts the build downloaded from the creditscom mvn-repo branches
declared in the poms were com.credits.client:general:1.2 and
com.credits.client:node_client:1.4 (jar and pom each, from the
thrift-api-client branch). Copy them byte for byte, with their checksums,
into third-party/mvn-repo, and mirror every repository except Maven Central
to that directory with third-party/maven-settings.xml, which the workflow
passes to every mvn call. The poms are unchanged.

The workflow checks out smart-contract-api 677c567f from the EnzinoBB fork
(branch build/reproducible-1518) instead of CREDITSCOM, uses a new Maven cache
key so the first run resolves everything through the mirror, and fails if the
Maven log mentions a creditscom or raw.github URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EnzinoBB
EnzinoBB merged commit 65a3362 into build/reproducible-1518 Oct 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant