Skip to content

Historical replay 4: support in-shard transfer transaction#15

Draft
syntrust wants to merge 1 commit into
qkc-history-replay-3from
qkc-history-replay-4
Draft

Historical replay 4: support in-shard transfer transaction#15
syntrust wants to merge 1 commit into
qkc-history-replay-3from
qkc-history-replay-4

Conversation

@syntrust

Copy link
Copy Markdown

Summary

This PR extends qkc-history-replay-3 with the first ordinary transaction replay path for historical QKC verification.

It adds PyQuarkChain typed transaction envelope parsing, embedded EVM RLP decoding, sender recovery, and historical transaction validation for legacy, typed, and EIP-155 signing modes. The verifier now supports minimal in-shard default-QKC transfer execution, including nonce updates, gas precharge/refund, miner fee accounting, reward-tax-aware coinbase handling, and block gasUsed checks.

It also expands cluster config parsing for replay-related fields, documents the current supported scope in quarkchain/replay/README.md, and adds tests for transaction parsing, signing validation, and minimal transfer replay.

Unsupported execution paths remain explicit, including contract creation/calls, non-empty data, cross-shard ordinary transactions, non-default tokens, gas-bearing x-shard receives, and receipt/meta-root verification.

Tests

The following replay range includes height 191, which contains the first supported ordinary
in-shard transfer transaction in the local PyQuarkChain mainnet DB sample.

go run ./cmd/qkc-replay-verify \
  --pyquarkchain-db /path/to/pyquarkchain/quarkchain/cluster/qkc-data/mainnet \
  --cluster-config quarkchain/mainnet/cluster_config_template.json \
  --full-shard-key 0x00070001 \
  --start 0 \
  --end 199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant