Package a single XDC binary for all networks and remove binary-switching logic from the CI/CD flow.
Changes:
- cicd/Dockerfile: build once and copy only /usr/bin/XDC
- cicd/entry.sh: validate NETWORK and remove runtime relink
- Makefile: make XDC-devnet-local depend on XDC; remove constants file swap
- common/constants: delete duplicated constants.go.{testnet,devnet,local}
Impact:
- network differences are now driven by runtime config, not separate binaries
Fix flaky countdown reset tests by performing an explicit second Reset before validating the second timeout window, and using a boundary-safe time check.
Observed failure:
--- FAIL: TestCountdownShouldReset (14.00s)
countdown_test.go:53: Correctly reset the countdown once
countdown_test.go:72: Countdown did not reset correctly second time
* chore: enable reward, penalty and dynamic gas on devnet
* update number to 3420000 for devnet
---------
Co-authored-by: liam.lai <liam.lai@babylonchain.io>
The upstream libray has removed the assembly-based implementation of
keccak. We need to maintain our own library to avoid a peformance
regression.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
The TestCountdownShouldBeAbleToStop test was failing intermittently due to
a race condition in the StopTimer() implementation. Previously, the goroutine
used defer to set initilised=false, which executed after close(q) signaled
completion to StopTimer(). This allowed StopTimer() to return before the
state was properly cleaned up, causing isInitilised() checks to occasionally
see stale true values.
Fixed by explicitly calling setInitilised(false) before close(q), ensuring
the state is updated atomically before StopTimer() returns. This eliminates
the race condition and makes the test pass consistently.
Verified by running the test 30 times consecutively with no failures.
XORBytes was added to package crypto/subtle in Go 1.20, and it's faster
than our bitutil.XORBytes. There is only one use of this function
across go-ethereum so we can simply deprecate the custom implementation.
---------
Co-authored-by: cui <cuiweixie@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
Fix typo in test error message where "MustParseBig" was incorrectly
used instead of "MustParseUint64" in the TestMustParseUint64Panic
function.
The test still functions correctly, but now the error message
accurately reflects the function being tested.
Co-authored-by: Gengar <creeptogengar@gmail.com>