Open
Conversation
miladz68
approved these changes
Feb 19, 2026
Contributor
miladz68
left a comment
There was a problem hiding this comment.
@miladz68 reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on masihyeganeh, metalarm10, and ysv).
masihyeganeh
requested changes
Feb 19, 2026
Contributor
masihyeganeh
left a comment
There was a problem hiding this comment.
@masihyeganeh reviewed 1 file and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on metalarm10, TxCorpi0x, and ysv).
build/tx-chain/build.go line 217 at r1 (raw file):
// targetPlatform is used for all Path() lookups so local and in-Docker builds use the same toolchain. func linuxMuslToolchainFor(targetPlatform txcrusttools.TargetPlatform) (linuxMuslToolchain, error) { switch targetPlatform {
This is already checked:
targetPlatform.OS == txcrusttools.OSLinux
So, I think this part is not needed.
build/tx-chain/build.go line 229 at r1 (raw file):
switch targetPlatform.Arch { case txcrusttools.ArchAMD64: gccBin, wasmLib, wasmSubdir = "bin/x86_64-linux-musl-gcc", "lib/libwasmvm_muslc.x86_64.a", "/x86_64-linux-musl/lib/libwasmvm_muslc.x86_64.a"
Again, everything except x86_64 and aarch64 are duplicated. We can simply get the architecture in a variable and format those paths
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.
Description
This pull request refactors and simplifies the logic for setting up the musl toolchain when building for Linux platforms in
build/tx-chain/build.go. The most important change is the introduction of a new helper struct and function to encapsulate the configuration for musl-based toolchains, reducing code duplication and improving maintainability. The main build logic is updated to use this new abstraction.Refactoring and toolchain configuration:
linuxMuslToolchainstruct and thelinuxMuslToolchainForfunction to encapsulate all musl toolchain paths and configuration for different Linux architectures, replacing duplicated logic and hardcoded values.buildTXdInDockerfunction to use the newlinuxMuslToolchainabstraction, greatly simplifying the logic for setting up compiler and library paths, Docker volumes, and environment variables for musl-based static builds.Build logic improvements:
FIXES
Incompatible build wasm causes SIGABORT panics in
wasmvmwhen the blockchain node is built without the needed muslc flags and properties which is needed in the Alpine blockchain node.Reviewers checklist:
Authors checklist
This change is