klaytn / klaytn

Official Go implementation of the Klaytn protocol
GNU Lesser General Public License v3.0
381 stars 187 forks source link

QA for v1.10.2 #1802

Closed aidan-kwon closed 1 year ago

aidan-kwon commented 1 year ago

Protocol Upgrade

Improvements

Fixes

Misc

Regular tests

Other updates

ian0371 commented 1 year ago
Parameter name before after how to check
(in addition to klay.getParams())
pre-Kore activation post-Kore activation
istanbul.committeesize 13 2 klay.getCommittee(), klay.getBlock().extraData A+1 A+0
governance.unitprice 25 ston 10 ston klay.gasPriceAt() A+1 (no effect) A+0 (no effect)
governance.deriveshaimpl 2 0 klay.getBlock().transactionsRoot A+1 A+0
reward.mintingamount 9.6 KLAY 6.4 KLAY klay.getRewards(), klay.getBalance() A+1 A+0
reward.ratio 34/54/12 50/40/10 klay.getRewards(), klay.getBalance() A+1 A+0
reward.kip82ratio 20/80 100/0 klay.getRewards(), klay.getBalance() A+1 (no effect) A+0
reward.useginicoeff false true klay.getStakingInfo().useGini A+1 (effective from next staking interval) A+0 (effective from next staking interval)
reward.deferredtxfee true false klay.getRewards(), klay.getBalance() A+1 A+0
reward.minimumstake 5m 6m klay.getCommittee() A+1 A+0
kip71.lowerboundbasefee 25 ston 40 ston klay.getBlock().baseFeePerBlock A+1 A+0
kip71.upperboundbasefee 750 ston 600 ston Using burst-fee-test, keep pushing up basefee A+1 A+0
kip71.gastarget 30m 22m Using burst-fee-test, measure basefee delta A+1 A+0
kip71.basefeedenominator 20 10 Using burst-fee-test, measure basefee delta A+1 A+0
kip71.maxblockgasusedforbasefee 60m 77m Using burst-fee-test, measure basefee delta A+1 A+0
governance.govparamcontract 0x0 deployed address Populate GovParam with setParamIn(deriveshaimpl,true,2,1) and then vote govparamcontract address A+1 (no effect) A+0

klaytn-issue1802-v1.10.2-governance-qa.md

JayChoi1736 commented 1 year ago

Regular QA Test

network sync duration sync time Latest DB size
baobab 0 to 116278122 3d 7h 35m 389G
cypress 0 to 52007590 5d 21h 53m 1.5T
cypress 52007591 to 76539733 8d 4h 25m 3.1T
cypress 76539734 to 85287012 8d 0h 2m 5.1T
cypress 85394216 to 116650000 11d 11h 7m 6.9T
blukat29 commented 1 year ago

Consensus committed seal count test

Inspect klay.getBlock(num).extraData to see how many seals (signatures) are in the block.

# of CommittedSeals
↓ committeeSize \ councilSize →
1 2 3 4
1 1 1 1 1
2 1 2 2 2
3 1 2 3 3
4 1 2 3 3

In contrast, in v1.10.1, if councilSize=4 and committeeSize=2 a block contains 1 CommittedSeals.

klaytn-issue1802-v1.10.2-pr1787-qa.md

blukat29 commented 1 year ago

Debug trace timeout test

yoomee1313 commented 1 year ago
transaction size test (tested with valueTransferForMemo txType) Tx size accepted data gas error
16KB yes '0x' + '11'.repeat(16241) 1645100 -
32KB yes '0x' + '11'.repeat(32625) 3283500 -
127KB yes '0x' + '11'.repeat(129903) 13011300 -
128KB yes '0x' + '11'.repeat(130927) 13113700 -
129KB failed '0x' + '11'.repeat(131951) - Error: Returned error: oversized data
162KB failed '0x' + '11'.repeat(165743) - Error: Returned error: oversized data
ian0371 commented 1 year ago

"Missing trie node" bug fix test

How to reproduce the bug

After the fix, the ERROR logs (Could not find the state, UpdateParams failed) must not appear.

ian0371 commented 1 year ago

klay_getRewards() invariant test

blukat29 commented 1 year ago

Check API for fund name changes

aidan-kwon commented 1 year ago

Treasury Rebalancing Test

Goal

Environment setup

Action Plan

Results

Balances (format: balance at [hf-1, hf, hf+1])

Retirees
- [ 3172099074091750000000n, 0n, 0n ]
- [ 1482688683131500000000n, 0n, 0n ]
Newbies
- [ 0n, 800000000000000000000n, 802880000000000000000n ]
- [ 0n, 800000000000000000000n, 801920000000000000000n ]

At hf, newbies have 800 KLAY At hf+1, newbies have 800 KLAY + reward (9.6 0.3 and 9.6 0.2, resp.)

getStakingInfo

> klay.getStakingInfo(630)
{
  KIRAddr: "0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0",
  PoCAddr: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
  blockNum: 570,
  councilNodeAddrs: ["0xd65c90c979211dbce62a4384bdd3c5e0b0f34d56", "0x82f0aa2d51455c65a10dcb1e7b6e3e4667d202d3", "0xf209d5624329e65a5d1a2507314a74f2a433422a", "0x317c4418007c8825ca7d3b85aef4f03ba3a4fdea"],
  councilRewardAddrs: ["0xd65c90c979211dbce62a4384bdd3c5e0b0f34d56", "0x82f0aa2d51455c65a10dcb1e7b6e3e4667d202d3", "0xf209d5624329e65a5d1a2507314a74f2a433422a", "0x317c4418007c8825ca7d3b85aef4f03ba3a4fdea"],
  councilStakingAddrs: ["0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6", "0xa51c1fc2f0d1a1b8494ed1fe312d7c3a78ed91c0", "0x959922be3caee4b8cd9a407cc3ac1c251c2007b1", "0xc6e7df5e7b4f2a278906862b61205850344d4e7d"],
  councilStakingAmounts: [7000000, 6000000, 5000000, 4000000],
  gini: -1,
  kcfAddr: "0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0",
  kffAddr: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
  useGini: false
}
> klay.getStakingInfo(631)
{
  KIRAddr: "0xdc64a140aa3e981100a9beca4e685f962f0cf6c9",
  PoCAddr: "0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9",
  blockNum: 600,
  councilNodeAddrs: ["0xd65c90c979211dbce62a4384bdd3c5e0b0f34d56", "0x82f0aa2d51455c65a10dcb1e7b6e3e4667d202d3", "0xf209d5624329e65a5d1a2507314a74f2a433422a", "0x317c4418007c8825ca7d3b85aef4f03ba3a4fdea"],
  councilRewardAddrs: ["0xd65c90c979211dbce62a4384bdd3c5e0b0f34d56", "0x82f0aa2d51455c65a10dcb1e7b6e3e4667d202d3", "0xf209d5624329e65a5d1a2507314a74f2a433422a", "0x317c4418007c8825ca7d3b85aef4f03ba3a4fdea"],
  councilStakingAddrs: ["0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6", "0xa51c1fc2f0d1a1b8494ed1fe312d7c3a78ed91c0", "0x959922be3caee4b8cd9a407cc3ac1c251c2007b1", "0xc6e7df5e7b4f2a278906862b61205850344d4e7d"],
  councilStakingAmounts: [7000000, 6000000, 5000000, 4000000],
  gini: -1,
  kcfAddr: "0xdc64a140aa3e981100a9beca4e685f962f0cf6c9",
  kffAddr: "0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9",
  useGini: false
}

chain config

> klay.getChainConfig(630)
{
  chainId: 2019,
  deriveShaImpl: 2,
  ethTxTypeCompatibleBlock: 0,
  governance: {
    govParamContract: "0x0000000000000000000000000000000000000000",
    governanceMode: "single",
    governingNode: "0xd65c90c979211dbce62a4384bdd3c5e0b0f34d56",
    kip71: {
      basefeedenominator: 20,
      gastarget: 30000000,
      lowerboundbasefee: 25000000000,
      maxblockgasusedforbasefee: 60000000,
      upperboundbasefee: 750000000000
    },
    reward: {
      deferredTxFee: true,
      kip82ratio: "20/80",
      minimumStake: 5000000,
      mintingAmount: 9600000000000000000,
      proposerUpdateInterval: 30,
      ratio: "50/30/20",
      stakingUpdateInterval: 30,
      useGiniCoeff: false
    }
  },
  istanbul: {
    epoch: 210,
    policy: 2,
    sub: 13
  },
  istanbulCompatibleBlock: 0,
  kip103CompatibleBlock: 630,
  kip103ContractAddress: "0x5fbdb2315678afecb367f032d93f642f64180aa3",
  koreCompatibleBlock: 630,
  londonCompatibleBlock: 0,
  magmaCompatibleBlock: 0,
  unitPrice: 25000000000
}

CN logs

homi-output-CN-0-1  | INFO[03/17,08:12:19 Z] [24|consensus/istanbul/backend/engine.go:521]    successfully executed treasury rebalancing (KIP-103)  memo="{\"retired\":{\"0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0\":1484608683131500000000,\"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512\":3174979074091750000000},\"newbie\":{\"0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9\":800000000000000000000,\"0xdc64a140aa3e981100a9beca4e685f962f0cf6c9\":800000000000000000000},\"burnt\":3059587757223250000000,\"success\":true}"
homi-output-CN-0-1  | INFO[03/17,08:12:19 Z] [24|consensus/istanbul/backend/engine.go:521]    successfully executed treasury rebalancing (KIP-103)  memo="{\"retired\":{\"0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0\":1484608683131500000000,\"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512\":3174979074091750000000},\"newbie\":{\"0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9\":800000000000000000000,\"0xdc64a140aa3e981100a9beca4e685f962f0cf6c9\":800000000000000000000},\"burnt\":3059587757223250000000,\"success\":true}"