Genesis migration: bootstrap a new chain from historical Audius data#152
Open
rickyrombo wants to merge 4 commits into
Open
Genesis migration: bootstrap a new chain from historical Audius data#152rickyrombo wants to merge 4 commits into
rickyrombo wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Embeds prod-v2.json and dev-v2.json genesis configurations. Adds OPENAUDIO_GENESIS env var to select the genesis independently of OPENAUDIO_ENV, allowing dev infrastructure to run against prod-v2 chain. Introduces genesis migration authority: an address set in genesis app_state whose ManageEntity transactions bypass ownership checks during migration. Tracks migration state in core_genesis_state table. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reduces TimeoutCommit from 400ms to 10ms when OPENAUDIO_GENESIS_MIGRATION=true, enabling ~100 blocks/second on a single-validator chain for faster entity ingestion during genesis replay. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… data Replays all historical Audius entities (users, tracks, playlists, follows, saves, reposts, plays) from a discovery-provider postgres DB to a bootstrap Core chain via synthetic ManageEntity and TrackPlay transactions. Includes: - run: concurrent batch replay with h2c gRPC support and mempool-full retries - verify: streaming merge comparison of two DBs for production-scale validation - keygen: generate a genesis migration keypair - docker-compose stack with postgres, openaudio node, and discovery provider - integration test gated behind the 'integration' build tag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
reflect.DeepEqualwithproto.Equalfor rollup report comparison in the auditorprod-v2.jsonanddev-v2.jsongenesis configs. AddsOPENAUDIO_GENESISenv var to select the genesis independently ofOPENAUDIO_ENV. Introduces a genesis migration authority — an address in genesisapp_statewhoseManageEntitytransactions bypass ownership checks during migration. Tracks state in a newcore_genesis_statetable.OPENAUDIO_GENESIS_MIGRATIONmode: ReducesTimeoutCommitfrom 400ms to 10ms on a single-validator bootstrap chain, enabling ~100 blocks/second for fast entity ingestion.genesis-replaytool: Replays all historical Audius entities (users, tracks, playlists, follows, saves, reposts, plays) from a discovery-provider postgres DB to a bootstrap Core chain via syntheticManageEntityandTrackPlaytransactions. Achieves ~1800 tx/s using direct h2c gRPC with 500 concurrent submissions.Test plan
go build ./...passesmake test-unitpassescd cmd/genesis-replay && make up && make test-integrationOPENAUDIO_GENESIS=prod-v2boots a node against the prod-v2 genesisOPENAUDIO_GENESIS_MIGRATION=truereduces block time on a single-validator devnet🤖 Generated with Claude Code