!5338itz/parity-build-garble-tooling → develop294b167ef0

Garbled release builds with an ASLR startup gate

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

3commits
16files
557lines changed
414lines to read
v0.17.0garble
3new CI jobs

Where the diff is

2-minute explainer

What changed

Why garble

Stripped binaries still name every function in .gopclntab.

image Aimage Bdiff .gopclntabfix named

The garble build

GARBLE=1 swaps go build for garble; sonic shimmed.

GOGARBLE=gitlab.com/thorchain-modfile tmp/garble/go.modno -cover

Keyshares survive garble

Name-keep markers plus a gate decoding ungarbled fixtures.

ecdsaecdsa_legacyeddsa

Startup checks

ASLR=2 required on Linux; wasmvm version embedded via ldflag.

randomize_va_space=2 ✓=1 ✗ refuses startunreadable → warn

State + upgrade

Build/env switches

  • newGARBLE (make var)off; 1 in release Dockerfile
  • newTHORNODE_SKIP_ASLR_CHECK (env)unset
  • newconstants.WasmvmVersiongo.mod wasmvm version via -X

Line by line · every changed logic line, narrated

8:13runtime
10code chapters
100%logic lines narrated (309/309)
10flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

.gopclntab
The Go runtime's PC-to-line table; it survives stripping and lists every function and file name. tools/check-garble/main.go ↗
ASLR
Address space layout randomization; kernel.randomize_va_space=2 enables it fully for PIE binaries. cmd/thornode/aslr.go ↗
garble
A Go build wrapper that obfuscates package, type and function names in the binary. burrowers/garble ↗
GOGARBLE
Env var listing which import paths garble renames; here gitlab.com/thorchain, covering thornode and tss-lib-private. Makefile ↗
libwasmvm
The CosmWasm VM shared library; wasmd checks its version against the Go module version at start.
LocalPartySaveData
tss-lib's per-node keyshare struct, stored as JSON without tags, so its field names must survive garble. ecdsa/tss_keysign.go ↗
PIE
Position-independent executable; the Dockerfile fails unless thornode is ELF type DYN with an interpreter. build/docker/Dockerfile ↗
sonic
bytedance's JIT JSON library used by cosmossdk.io/log; garble cannot build it, so a shim replaces it. build/garble/sonic/sonic.go ↗