Closed aidan-kwon closed 1 year ago
homi setup local --baobab-test --cn-num 4 --funding-addr 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 --patch-address-book --patch-address-book-addr 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 [--kore-compatible-blocknumber 9999999]
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 |
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 |
Unusual logs during sync test none
Warning logs about network connection during sync test
RetrieveNodes: Not Supported NodeType Discover=Table NodeType=1 // findNode for CN nodetype(1) is not allowed
Bad discv4 packet addr=3.36.78.12:32333 err="too small" // udp packet with too short size is discarded
grafana result: Klaytn Main Overview - Grafana.pdf
[x] Load test
[x] Stress: 10000 RPS load test for 30m
TC: transferSignedTx
TPS: 5610
CN : m6i.8xlarge
block mining time : 0.998s
[x] Reliability: 2000 RPS load test for 72h
TC: transferSignedTx, newValueTransferTC, newFeeDelegatedSmartContractExecutionTC
TPS: 2000
Peer Connection: stable
BlockGenerationTime: 0.992s
[x] API performance test:
Version | 1.10.0 | 1.10.2-rc.3 |
---|---|---|
readBlockNumber | 164906 | 173340 |
readGetAccount | 94581 | 99345 |
readGetBlockByNumber | 216.90 | 167.76 |
readGetBlockWithConsensusInfoByNumber | 245.23 | 194.71 |
Consensus committed seal count test
Inspect klay.getBlock(num).extraData
to see how many seals (signatures) are in the block.
governance.vote(governance.removevalidator)
governance.vote(istanbul.committeesize)
rlp decode 0xf9... | jq
to decode extraData (use rlp package)# 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.
Debug trace timeout test
debug.traceTransaction(txid)
- returns less than a second and throws "trace logger timeout"debug.traceTransaction(txid, {loggerTimeout:"3s"})
- runs for the specified amount of time. No memory increase after timer ends.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 |
"Missing trie node" bug fix test
How to reproduce the bug
governance.vote("governance.govparamcontract", <nonzero-addr>)
docker-compose stop PN-0
)docker-compose start PN-0
)INFO[03/07,02:38:00 Z] [5|blockchain/blockchain.go:499] Loaded most recent local header number=140 hash=5160b9…a2fe77 td=141 age=7s
INFO[03/07,02:38:00 Z] [5|blockchain/blockchain.go:500] Loaded most recent local full block number=140 hash=5160b9…a2fe77 td=141 age=7s1ms
INFO[03/07,02:38:00 Z] [5|blockchain/blockchain.go:501] Loaded most recent local fast block number=140 hash=5160b9…a2fe77 td=141 age=7s1ms
WARN[03/07,02:38:00 Z] [5|blockchain/blockchain.go:310] Head state missing, repairing chain number=140 hash=0x5160b9b6b2e2c258d04063c705d9c03d1875f6d34a1f2b1f557ee0b24ca2fe77
INFO[03/07,02:38:00 Z] [5|blockchain/blockchain.go:499] Loaded most recent local header number=140 hash=5160b9…a2fe77 td=141 age=7s7ms
INFO[03/07,02:38:00 Z] [5|blockchain/blockchain.go:500] Loaded most recent local full block number=128 hash=e8abee…f5fe10 td=129 age=7s7ms
INFO[03/07,02:38:00 Z] [5|blockchain/blockchain.go:501] Loaded most recent local fast block number=140 hash=5160b9…a2fe77 td=141 age=7s7ms
ERROR[03/07,06:17:08 Z] [30|governance/contract_connector.go:119] Could not find the state err="missing trie node d3cbe0a3f27885353d33a7db622a82123302f15baf41f11ca5bad855a58dade6 (path )" num=146
ERROR[03/07,06:17:08 Z] [30|governance/mixed.go:158] contractGov.UpdateParams() failed err="missing trie node d3cbe0a3f27885353d33a7db622a82123302f15baf41f11ca5bad855a58dade6 (path )"
Fatal: Error starting protocol stack: missing trie node d3cbe0a3f27885353d33a7db622a82123302f15baf41f11ca5bad855a58dade6 (path )
After the fix, the ERROR logs (Could not find the state, UpdateParams failed) must not appear.
klay_getRewards() invariant test
klay_getRewards()
stick to the invariant minted + totalFee - burntFee = proposer + stakers + kgf + kir
Check API for fund name changes
klay_getRewards()
returns kff kcf
onlygovernance_getStakingInfo()
returns both PocAddr KIRAddr
and kffAddr kcfAddr
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}"
Protocol Upgrade
1809
1810
1812
Improvements
1764
1769
1747
1748
1733
1767
1772
1779
1782
1783
1785
1791
1787
1762
1778
1789
1792
1786
Fixes
1766 - @ian0371
1771 - @ian0371
1765 - @kjeom
Misc
1745
1757
1768
Regular tests
Other updates