From 80b76cbd5eb7f924ba618d0ac3159175ac7714ce Mon Sep 17 00:00:00 2001 From: bdchatham Date: Mon, 24 Aug 2026 17:51:41 -0700 Subject: [PATCH] fix(nightly): unblock the chain-upgrade suite on a pre-giga image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two independent fixes to TestNightlyChainUpgrade. Only the first addresses the failure the suite shows today. Pin giga_executor.enabled=false in upgradeConfig. sei-config v0.0.25 added GigaExecutor{Enabled: true} to its base defaults and renders it into every app.toml, overriding the binary's own default. The sidecar carries that version and applies it to every chain it provisions. But sei-chain only began copying libevmone into the runtime image on 2026-06-23 (b8776ed2d); before that the library exists in the source tree and never reaches the final layer. A pre-2026-06-23 binary therefore reads giga_executor.enabled=true, calls InitEvmoneVM, and panics inside app.New at app.go:753 before it binds the RPC port. The upgrade suite is the only one that runs such a binary. Its SEID_UPGRADE_FROM_IMAGE is pinned by design, because a minor-version upgrade test needs a pre-upgrade binary; every other suite runs a fresh nightly whose libevmone loads. All four validators crash-looped at height 0, nothing served /status, and WaitReady consumed the full 60-minute context — four consecutive nights from 2026-08-21, each failing at exactly 3600s. The pin is a compatibility declaration with an expiry, not a preference. Drop it once SEID_UPGRADE_FROM_IMAGE is v6.6.0 or later. Gate the first block before submitting the upgrade proposal. This is a separate, older defect and it is NOT what fails today. Genesis accounts become queryable only once block 1 commits, and the proposal task looks the proposer account up before it signs. WaitReady gates on the SeiNetwork phase plus a single /status probe, and a chain still at height 0 satisfies both. It bit once, on 2026-08-14: the run read "current height 0" and the task failed with "account sei1zmaq0e... not found: key not found". Six runs that read height 1 or above all passed. pollHeightAtLeast already existed in this file. Verified: gofmt clean, go vet -tags integration clean, the integration test binary compiles. The suite itself was not run; it needs a cluster. Co-Authored-By: Claude Opus 5 (1M context) --- test/integration/upgrade_test.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/integration/upgrade_test.go b/test/integration/upgrade_test.go index 6cb1039c..933f3ad1 100644 --- a/test/integration/upgrade_test.go +++ b/test/integration/upgrade_test.go @@ -65,9 +65,17 @@ var votingPeriodGenesis = map[string]string{ // upgradeConfig are the seid runtime overrides the upgrade flow needs: the REST // API serves the gov proposal queries (off by default), and kv tx-indexing lets // the proposal-submission tx be found. +// +// giga_executor.enabled is pinned off because the pre-upgrade image predates the +// executor. sei-config renders enabled=true into every app.toml and overrides the +// binary's own default, but sei-chain only began shipping libevmone in the runtime +// image on 2026-06-23; an older binary reads the flag, calls InitEvmoneVM and +// panics in app.New before it binds the RPC port. Drop this line once +// SEID_UPGRADE_FROM_IMAGE is v6.6.0 or later. var upgradeConfig = map[string]string{ - "api.rest.enable": "true", - "tx_index.indexer": "kv", + "api.rest.enable": "true", + "tx_index.indexer": "kv", + "giga_executor.enabled": "false", } // restUnreachable is the last-seen note when a gov REST poll gets no 200. @@ -144,6 +152,14 @@ func TestNightlyChainUpgrade(t *testing.T) { rest := ch.network.REST() hc := &http.Client{Timeout: 15 * time.Second} + // Genesis accounts become queryable only once block 1 commits, and the proposal + // task looks the proposer account up before it signs. WaitReady gates on the + // SeiNetwork phase plus one /status probe, both of which a chain still at height + // 0 satisfies, so wait out the first block here. + if err := pollHeightAtLeast(ctx, hc, tmRPC, 1); err != nil { + t.Fatalf("network %q first block: %v", chainID, err) + } + // Schedule the upgrade comfortably ahead of the current height so the 60s // voting period elapses and the proposal passes before the chain halts. cur, ok := sei.LatestHeight(ctx, hc, tmRPC)