bug: LocalTerra stops producing blocks at height 100800 consistently #21

Closed
opened 2026-03-14 03:34:39 +00:00 by Brouie · 6 comments
Brouie commented 2026-03-14 03:34:39 +00:00 (Migrated from gitlab.com)

Description

LocalTerra consistently stops producing blocks at height 100800. The validator remains online (VotingPower: 10) but no new blocks are created. This has happened 3+ times during QA testing, requiring full volume wipe and redeploy each time.

Impact

Critical for development — all transactions fail after chain freezes. Requires docker compose down -v and full redeploy (make deploy-local) to recover, which takes ~5 minutes.

Steps to Reproduce

  1. make start (fresh volumes)
  2. make deploy-local (deploys to ~block 100800)
  3. Wait — chain stops at exactly block 100800
  4. All subsequent TXs fail with 'Tx not found' or timeout

Environment

  • Docker image: ghcr.io/plasticdigits/localterra-cl8y:latest
  • Docker Compose v5.1.0
## Description LocalTerra consistently stops producing blocks at height 100800. The validator remains online (VotingPower: 10) but no new blocks are created. This has happened 3+ times during QA testing, requiring full volume wipe and redeploy each time. ## Impact Critical for development — all transactions fail after chain freezes. Requires docker compose down -v and full redeploy (make deploy-local) to recover, which takes ~5 minutes. ## Steps to Reproduce 1. make start (fresh volumes) 2. make deploy-local (deploys to ~block 100800) 3. Wait — chain stops at exactly block 100800 4. All subsequent TXs fail with 'Tx not found' or timeout ## Environment - Docker image: ghcr.io/plasticdigits/localterra-cl8y:latest - Docker Compose v5.1.0
Brouie commented 2026-03-14 03:59:53 +00:00 (Migrated from gitlab.com)

mentioned in issue #19

mentioned in issue #19
PlasticDigits commented 2026-03-14 05:22:24 +00:00 (Migrated from gitlab.com)

mentioned in commit 103744ef13

mentioned in commit 103744ef133d7507786cc2a707aadcc2b02040fa
PlasticDigits commented 2026-03-14 05:22:41 +00:00 (Migrated from gitlab.com)

Root Cause

The chain halts at block 100800 because of the Oracle module's slash_window parameter in the default Terra Classic genesis.

LocalTerra runs a single validator with no oracle feeder. The oracle module expects price votes every 5 blocks. After 100800 blocks (the full slash_window), the EndBlocker evaluates participation, finds the validator missed >95% of votes, and jails it. With the only validator jailed, no more blocks can be produced.

Parameter Value Effect
slash_window 100800 Evaluation interval (= 1 week at 6s blocks)
vote_period 5 Oracle vote expected every 5 blocks
min_valid_per_window 0.05 Must participate in ≥5% of votes
slash_fraction 0.0001 Slash amount per window

With the fast 200ms block time, the chain reaches this boundary in ~5.6 hours instead of 7 days.

Fix (commit 103744e)

Mounted a patched docker/init-chain.sh via docker-compose.yml that modifies genesis oracle params at chain init:

  • slash_fraction → 0 (no slashing penalty)
  • min_valid_per_window → 0 (no minimum vote participation)
  • whitelist → [] (no currencies requiring oracle votes)

To verify

make reset    # wipe old chain state (required — genesis params are baked in)
make start
make wait-healthy
make deploy-local
# Chain should now run past block 100800 indefinitely

@Brouie — QA: please verify the chain continues producing blocks well past 100800 after a fresh make reset && make start && make deploy-local. A good check is to let it run for 6+ hours and confirm blocks are still advancing via curl -s http://localhost:26657/status | jq '.result.sync_info.latest_block_height'.

## Root Cause The chain halts at block **100800** because of the **Oracle module's `slash_window`** parameter in the default Terra Classic genesis. LocalTerra runs a single validator with no oracle feeder. The oracle module expects price votes every 5 blocks. After 100800 blocks (the full `slash_window`), the `EndBlocker` evaluates participation, finds the validator missed >95% of votes, and **jails it**. With the only validator jailed, no more blocks can be produced. | Parameter | Value | Effect | |---|---|---| | `slash_window` | `100800` | Evaluation interval (= 1 week at 6s blocks) | | `vote_period` | `5` | Oracle vote expected every 5 blocks | | `min_valid_per_window` | `0.05` | Must participate in ≥5% of votes | | `slash_fraction` | `0.0001` | Slash amount per window | With the fast 200ms block time, the chain reaches this boundary in ~5.6 hours instead of 7 days. ## Fix (commit 103744e) Mounted a patched `docker/init-chain.sh` via `docker-compose.yml` that modifies genesis oracle params at chain init: - `slash_fraction` → `0` (no slashing penalty) - `min_valid_per_window` → `0` (no minimum vote participation) - `whitelist` → `[]` (no currencies requiring oracle votes) ## To verify ```bash make reset # wipe old chain state (required — genesis params are baked in) make start make wait-healthy make deploy-local # Chain should now run past block 100800 indefinitely ``` @Brouie — QA: please verify the chain continues producing blocks well past 100800 after a fresh `make reset && make start && make deploy-local`. A good check is to let it run for 6+ hours and confirm blocks are still advancing via `curl -s http://localhost:26657/status | jq '.result.sync_info.latest_block_height'`.
Brouie commented 2026-03-17 04:38:59 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
Brouie (Migrated from gitlab.com) closed this issue 2026-03-18 02:12:36 +00:00
Brouie commented 2026-03-18 02:12:38 +00:00 (Migrated from gitlab.com)

Verified fixed — LocalTerra reached block 222,944 without freezing. The new init-chain.sh resolved the validator stall at block 100800.

Verified fixed — LocalTerra reached block 222,944 without freezing. The new init-chain.sh resolved the validator stall at block 100800.
PlasticDigits commented 2026-05-27 05:37:33 +00:00 (Migrated from gitlab.com)

mentioned in issue #162

mentioned in issue #162
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#21
No description provided.