Closed blukat29 closed 3 months ago
KIP-162 Priority Fee tx processing & KIP-162 Priority Fee GASPRICE opcode
See the testing code here
For Type2
min(basefee + maxPriorityFeePerGas, maxFeePerGas)
effectiveGasPrice - basefee
For legacy & klaytn type (maxPriorityFeePerGas = maxFeePerGas = gasPrice
)
gasPrice
gasPrice - basefee
Check list
effectiveGasPrice * gasUsed
effectiveGasPrice
rewardFee < miningFee
: Proposer only gets mining reward.rewardFee >= miningFee
: Proposer gets mining reward and rewardFeegetTransactionReceipt.effectiveGasPrice
returns correct effectiveGasPrice
getRewards
considers the gas tipeffectiveGasTip
KIP-162 Priority Fee related APIs
Populating transactions with maxPriorityFeePerGas != 0
for more than 20 blocks to see the feeHistory works correctly.
Check list
Fork level | eth_sendTransaction (type 2) | eth_gasPrice | eth_maxPriorityFeePerGas |
---|---|---|---|
Before EthTxType | N.A. | fixed unit price (baseFee) | fixed unit price (baseFee) |
After EthTxType | maxFeePerGas == maxPriorityFeePerGas == fixed unit price |
fixed unit price (baseFee) | fixed unit price (baseFee) |
After Magma | maxFeePerGas >= baseFee |
2 * baseFee | 0 |
After Kaia | Follow KIP-162 | baseFee + SuggestTipCap | SuggestTipCap |
node | sync period | load | duration (expect) | duration (real) |
---|---|---|---|---|
baobab | 0 to 1,5000,0000 | very light | 5d 4h | 9d |
cypress1 | 0 to 6000,0000 | very light -> light->heavy | 7d | 14d |
cypress2 | 6000,0000 to 7500,0000 | light | 6d | 9d |
cypress3 | 7500,0000 to 8100,0000 | very heavy | 7d | 9d |
cypress4 | 8100,0000 to 9000,0000 | heavy | 7d | 9d |
cypress5 | 9000,0000 to 1,1000,0000 | light | 6d 18h | 10d |
cypress6 | 1,1000,0000 to 1,1800,0000 | heavy | 6d 7h | 9d |
cypress7 | 1,1800,0000 to 1,2600,0000 | heavy | 6d 10h | 9d |
cypress8 | 1,2600,0000 to 1,3600,0000 | heavy | 7d | 11 d |
cypress9 | 1,3600,0000 to 1,4600,0000 | heavy | 7d | 11 d |
cypress10 | 1,4600,0000 to 1,5600,0000(latest) | heavy | 6d | 13d |
Ending credit
curl, console test. All data is same with v1.12.1 output except endingPhoto
, endingNames
fields are newly added.
Tested with two cypress full ENs. (kaia v0.9.0, klaytn v1.12.1)
curl -X POST --data '{"jsonrpc":"2.0", "method":"klay_getCypressCredit", "params":[],"id":1}' -H "Content-Type: application/json" http://43.201.250.92:8551 > result.json
> klay.getCypressCredit().endingPhoto
""
> klay.getCypressCredit().endingNames
""
> klay.getCypressCredit().names
"Andrew Kim, Andy Shin, Austin Brown, Bongtae Yun, Bora Kang, Boyoung Kim, Byungchul Lee, Choah Jung, Christine Lee, Daewoo Cho, Donghwan Kwon, Dongju Lee, Eric Kim, Euiyoul Kim, Goun Kwak, Kuwon Ra, Gwangil Won, HeeJae Myoung, Hosung Han, Hoyoung Kang, Hyewon Lim, Hyojin Oh, Hyung-Kyu Choi, Hyunjin Lee, Hyunmin Han, Ian Park, Ire Song, Jaesun Han, Jaewon Han, Jaewoo Lee, Jensen Yap, Jeongho Nah, Jeongkyun Oh, Ji Sung Lim, Jiehwan Song, Jieun Kim, JiEun Lee, Jimin Kim, Jina Kim, Jinhun Shin, Jiwon Bae, Jiwon Ryu, John Cho, Jong Gun Lee, Jonghui Lee, Joonsung Lee, Joseph Hung, Ju Hye Kim, Junghun Hur, Junghyun Kim, Junghyun Lee, Junhee Woo, Junho Cho, Junsic Youn, KiJun Sung, Kyung Tae No, KyungKoo Kim, Kyungup Kim, Mi Jeong Park, Minjae Lee, Minjee Kim, Minsu Kim, Myeongjin Jeong, Namseok Baek, Sangeon Bae, Sangmin Seo, Sean Kim, Seonghwan Cho, Seungchan Shin, Siho Choue, Sojin Kim, Soo Hwan Kim, Soon Il Hong, SukEui Lim, Taekeun Kim, Uno Lee, Woojin Lee, Yeehyun Chun, Yeolmae Kim, Yerang Park, YG Kang, Yirey Suh, Yongho Choi, YongJoon Kim, Yoshi Shin, Youngjun Lim, Youngkyu Park, Youngmin Park, Yuna Noh, Yunsuk Seo, Yuntaek Lim, Zachary Keats"
> klay.getCypressCredit().photo
...........yUUQZzparPzxUr3KKIP/Z" # too long so check only back
Kaia hardfork test. "endingPhoto" and "endingNames" field returns null before kaia hardfork and non-null after kaia. Tested at private network. ChainId:8217, homi: use --cypress-test. kaia hardfork block number: 40.
> klay.getCypressCredit().endingPhoto
""
> klay.getcypressCredit().endingNames
""
> klay.blockNumber
15
> klay.blockNumber
48
> klay.getCypressCredit().endingPhoto
"EndingPhoto TBU"
> klay.getcypressCredit().endingNames
"EndingNames TBU"
KIP-163 Public Delegation and 1-block staking interval
homi setup --cn-num 4 --baobab --address-book-mock --gen-type local
Block | Action | Committee Change |
---|---|---|
34 | val2 unstakes 4m | [val1, val2, val3, val4] |
35 | - | [val1, val3, val4] |
38 | val2 deposits 4m | - |
39 | - | [val1, val2, val3, val4] |
42 | val4 unstakes all | - |
43 | - | [val1, val2, val3] |
46 | val3 unstakes all | - |
47 | - | [val1, val2] |
50 | val2 unstakes all | - |
51 | - | [val1] |
54 | val1 unstakes all | - |
55 | - | [val1, val2, val3, val4] |
Block | Action | Committee Change |
---|---|---|
46 | val2 unstakes 4m | [val1, val2, val3, val4] |
60 | - | [val1, val3, val4] |
KIP-160 test
KCF
* 599: 275328000000000000000
* 600: 0
KFF
* 599: 1238976000000000000000
* 600: 0
KIF
* 599: 0
* 600: 200000000000000000000000000
KEF
* 599: 0
* 600: 3300000000000000000000000
LOCKUP
* 599: 0
* 600: 3300000000000000000000000
AIRDROP
* 599: 0
* 600: 8800000000000000000000000
BRIDGE
* 599: 10000000000000000000
* 600: 111298357000000000000000000
{
"blockNum": 480,
"councilNodeAddrs": [
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc",
"0x90f79bf6eb2c4f870365e785982e1f101e93b906"
],
"councilStakingAddrs": [
"0x0165878a594ca255338adfa4d48449f69242eb8f",
"0x0dcd1bf9a1b36ce34237eeafef220932846bcd82",
"0x3aa5ebb10dc797cac828524e59a333d0a371443c",
"0x4a679253410272dd5232b3ff7cf5dbb88f295319"
],
"councilRewardAddrs": [
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc",
"0x90f79bf6eb2c4f870365e785982e1f101e93b906"
],
"kefAddr": "0x84ea74d481ee0a5332c457a4d796187f6ba67feb",
"kifAddr": "0x9e545e3c0baab3e08cdfd552c960a1050f373042",
"useGini": false,
"gini": -1,
"councilStakingAmounts": [
5000000,
5000000,
5000000,
5000000
],
"KIRAddr": "0x84ea74d481ee0a5332c457a4d796187f6ba67feb",
"PoCAddr": "0x9e545e3c0baab3e08cdfd552c960a1050f373042",
"kcfAddr": "0x84ea74d481ee0a5332c457a4d796187f6ba67feb",
"kffAddr": "0x9e545e3c0baab3e08cdfd552c960a1050f373042"
}
{
"blockNum": 599,
"councilNodeAddrs": [
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc",
"0x90f79bf6eb2c4f870365e785982e1f101e93b906"
],
"councilStakingAddrs": [
"0x0165878a594ca255338adfa4d48449f69242eb8f",
"0x0dcd1bf9a1b36ce34237eeafef220932846bcd82",
"0x3aa5ebb10dc797cac828524e59a333d0a371443c",
"0x4a679253410272dd5232b3ff7cf5dbb88f295319"
],
"councilRewardAddrs": [
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc",
"0x90f79bf6eb2c4f870365e785982e1f101e93b906"
],
"kefAddr": "0xf4c05e5887b759baf5e7a248f6c53d629da42a6a",
"kifAddr": "0x785c5e52d9c1dc59bf495c79d0c7302fa3cb0c0a",
"useGini": false,
"gini": -1,
"councilStakingAmounts": [
5000000,
5000000,
5000000,
5000000
],
"KIRAddr": "0xf4c05e5887b759baf5e7a248f6c53d629da42a6a",
"PoCAddr": "0x785c5e52d9c1dc59bf495c79d0c7302fa3cb0c0a",
"kcfAddr": "0xf4c05e5887b759baf5e7a248f6c53d629da42a6a",
"kffAddr": "0x785c5e52d9c1dc59bf495c79d0c7302fa3cb0c0a"
}
{
"before": {
"zeroed": {
"0x84ea74d481ee0a5332c457a4d796187f6ba67feb": 275328000000000000000,
"0x9e545e3c0baab3e08cdfd552c960a1050f373042": 1238976000000000000000
},
"allocated": {
"0x5fbdb2315678afecb367f032d93f642f64180aa3": 0,
"0x785c5e52d9c1dc59bf495c79d0c7302fa3cb0c0a": 2375000000000000000,
"0x809d550fca64d94bd9f66e60752a544199cfac3d": 10000000000000000000,
"0xdc64a140aa3e981100a9beca4e685f962f0cf6c9": 0,
"0xf4c05e5887b759baf5e7a248f6c53d629da42a6a": 2375000000000000000
}
},
"after": {
"zeroed": {
"0x84ea74d481ee0a5332c457a4d796187f6ba67feb": 0,
"0x9e545e3c0baab3e08cdfd552c960a1050f373042": 0
},
"allocated": {
"0x5fbdb2315678afecb367f032d93f642f64180aa3": 8800000000000000000000000,
"0x785c5e52d9c1dc59bf495c79d0c7302fa3cb0c0a": 600000000000000000000000000,
"0x809d550fca64d94bd9f66e60752a544199cfac3d": 111298357000000000000000000,
"0xdc64a140aa3e981100a9beca4e685f962f0cf6c9": 3300000000000000000000000,
"0xf4c05e5887b759baf5e7a248f6c53d629da42a6a": 200000000000000000000000000
}
},
"burnt": -923396827946000000000000000,
"success": true
}
getTotalSupply
{
"number": "0x257",
"totalSupply": "0x111b0ec57e6499a1f4b1014d52e72ac7c9cd4cbb800",
"totalMinted": "0x111b0ec57e6499a1f4b1014d52e9064bd1336400000",
"totalBurnt": "0x1db8407661744800",
"burntFee": "0x1db8407661744800",
"zeroBurn": "0x0",
"deadBurn": "0x0",
"kip103Burn": "0x0",
"kip160Burn": "0x0"
}
{
"number": "0x258",
"totalSupply": "0x111b0ec57e6499a1f4b1310a6114f28037a0b12b800",
"totalMinted": "0x111b0ec57e6499a1f4b1014d52f143b84bdec760000",
"totalBurnt": "-0x2fbd0e23aec7ebc1e9cb800",
"burntFee": "0x1db8407661744800",
"zeroBurn": "0x0",
"deadBurn": "0x0",
"kip103Burn": "0x0",
"kip160Burn": "-0x2fbd0e258a4bf3280110000"
}
RPC related
> kaia.getBlsInfos('latest')
{
0x571E53Df607bE97431a5bBeFcA1DFfE5aEF56F4d: {
pop: "b52cb928ade619db168a961bc9dc89a9c3683ed6a5aea064478af40ba440b4d47c010f0cda2c0a57b78dbab2fda1325003a87bc1895eb28a8f04c34033079a5f1f930769bd79f2d4a66c79c08d1549d6e2ee7c8ad6a0585e10416d8aa924ba51",
publicKey: "b6b4956ea830c6ac934ee8300bb83328e8d5fc089259bdb1efe921f0d415b55fa71ef6ceb6b62a374f14099e13fb67de",
verifyErr: null
},
0x5Cb1A7dccbd0Dc446e3640898EDE8820368554c8: {
pop: "86412701ba9bbb26cc1138e3ff38c3072048f86c4403a4b23115d01eab277814173319b0abe6788a20120d232b62c113102d0e0ae126b6e734da262cb38f3d5386ae9aae50761dda1e2a5fed106fca20c05b8e7d74832f8ac7a5a709c8724f2b",
publicKey: "95aa20f7ad96b0bab291f457996fe07f097ac3823c93338aca9467081b5ca186e71246fbc5f1e581374f204939c8bc8d",
verifyErr: null
},
0x99FB17d324fa0e07F23b49d09028Ac0919414dB6: {
pop: "a0c59a669b10a1b8c41c0ed565299ea0dc4b85d5b5fcd00969a8b8b764800f4c7d158a87f7d1f36a94461fcd8e5b8d6f066022f42011a36691ec6889162db95c1d9a694141e42175b7cec7c8ad78566adca4f8b5cbfa3e5dc79329a833797bdd",
publicKey: "87704f62c752e330ab8e222aca3543be3ada895261ae9d2a4899a493a9c3aa1ae1acaf0714fd68256177bcb0190403db",
verifyErr: null
},
0xB74Ff9DEa397fE9E231df545eb53fE2ADF776cb2: {
pop: "93c2ccfea214359175c26b39ae03516c4dbeab3d5d2752d176cd5e6ee1015cda57c16e5684bf7651ec4ace273dd2c17e135bb495bd6fcff57152ffa5f929903eccd017d706d6afaab5d88f26641a19aa4782c58a0190c893ea5f916a97e3cb05",
publicKey: "98adde23e4ca98f33eb23adcd4eadc86803bb92cb7c949a283573bf618cceb9a8fdbf01975916dacbea298faefbd1b3c",
verifyErr: null
}
}
> kaia.getActiveAddressFromRegistry('KIP113', 'latest')
"0x4beed0651c46ae5a7cb3b7737345d2ee733789e6"
> kaia.getAllRecordsFromRegistry('KIP113', 'latest')
[{
activation: 0,
addr: "0x4beed0651c46ae5a7cb3b7737345d2ee733789e6"
}]
# curl klay namespace
$ curl -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0", "id":1, "method":"klay_blockNumber", "params":[]}' http://localhost:8651
{"jsonrpc":"2.0","id":1,"result":"0x94a088b"}
# curl kaia namespace
$ curl -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0", "id":1, "method":"kaia_blockNumber", "params":[]}' http://localhost:8651
{"jsonrpc":"2.0","id":1,"result":"0x94a0896"}
# console klay namespace
$ ken attach --exec "klay.blockNumber" http://localhost:8651
155846835
# console kaia namespace
$ ken attach --exec "kaia.blockNumber" http://localhost:8651
155846848
getTotalSupply
Compared the Cypress data
klay_getTotalSupplyl
klay_getRewardsAccumulated
The discrepancy seems small enough with respect to the latest total supply 5957870616.43047.
The tarball download used to contain the config file for baobab. For Kaia there's only the binary. So the binary upgrade is enough, no changes in config?
Hello @cshintov, For the v1.0.0 you can simply replace the kcn,kpn,ken binaries. The scripts kXnd and config file templates kXnd.conf shpuld work unchqnged. But for completeness and ease of management, we are going to distribute v1.0.1 tarball, rpm and docker images. Note that the mainnet hardfork is going to be activated by v1.0.1, so 1.0.1 is actually important release.
kaia
andklay
namespaces both work via console and curl