Uh oh!
There was an error while loading. Please reload this page.
Design: GoQuarkChain rearchitecture — without regenesis - #139
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
qzhodl
commented
May 8, 2026
There’s a lot of overlap with #137. Could you show only the differences so reviewers don’t have to go through the same content again? |
ping-ke
commented
May 8, 2026
GoQuarkChain Redesign: Plan ComparisonTwo redesign plans are under consideration:
Core Differences
xshard DesignThe xshard design is not the main part of the review; the xshard designs in the two plans can be applied to each other. Pros and ConsPlan A — No RegenesisPros
Cons
Plan B — RegenesisPros
Cons
SummaryThe choice reduces to engineering cost vs. community cost:
|
Summary
Adds the primary design doc for the GoQuarkChain rearchitecture ( Embedded geth — Avoids Regenesis), which drives the upcoming Go / geth upgrade and EVM alignment work.
The document specifies how to replace the vendored go-ethereum v1.8.20 with a QuarkChain fork of upstream geth v1.17.2+ without regenesis, covering the architectural split, hard-fork mechanism, lazy state migration, transaction format migration, xshard redesign, block header mapping, the geth patch set, and the new module layout.
Highlights
go.modusesreplaceto point atQuarkChain/go-ethereum v1.17.2-qkc. Divergence from upstream is collapsed into 6 targeted patches, so future upgrades land viagit merge upstreamwith conflicts confined to those files.ExecutionLayerGo interface boundary is introduced, but the deployment topology (master + N slaves), the master–slave gRPC protocol, and the P2P wire protocol are all unchanged.MinorBlockChain) or ModernEL (embedded upstream geth) based onPrevRootBlockHeight.TokenBalanceMap accounts are decoded on read and rewritten in standard geth format on commit. Non-native tokens migrate via a pre-deployedTokenMigrationRegistry+ per-token ERC-20 contracts, with system mints triggered on first account access — zero overhead at the fork block.XshardSendsystem contract; destination side introduces an OP-style EIP-2718 type0x71XShardDepositTxsystem transaction. Slave-to-slave TCP distribution, the gas model, and execution ordering are all preserved.N-20xshard pause,N-10full tx pause) drain the mempool and xshard queue before cutover. MetaMask users transition transparently viabaseFeeauto-detection.MinorBlockHeaderis kept as the on-chain type so the root block format is unchanged. Two projection helpers (toGethHeader()/gethHeaderToMinorBlockHeader()) bridge to/fromethTypes.Header; post-fork, the canonical minor-block hash is geth'sHeader.Hash().Scope of this PR
L1/goquarkchain-redesign-avoids-regenesis.md(916 lines).shardcl/,shardel/, system contracts (XshardSend,TokenMigrationRegistry), andmetamask_api.goadaptation.Open Questions
Items the doc flags as undecided and worth resolving during review:
QKCForkRootHeight(governance decision).gorocksdbwith pebble, and whether to dropbou.ke/monkey(Go 1.17+ unsafe restrictions).Reviewer Focus
Suggested areas for close review:
N-20/N-10suspension windows plus thesetHead(confirmedHeaderTip)cutover insideAddRootBlock(N)actually guarantee an empty mempool and an empty xshard queue at the fork boundary?journal.dirtyinsideload()for accounts with non-native balances sufficient to prevent the double-mint hazard on read-only access?CoinbaseAmount,MetaHash) post-fork — any consensus implication on the root chain side?