-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QA for v1.0.1 #14
Comments
kaia_getTransaction returns correct gasPrice for mined transactions
v1.0.0
v1.0.1-rc.1
kaia_getTotalSupply returns all fields for Kairos testnet
v1.0.0
v1.0.1-rc.1
Message signing RPCs are EIP-191 compliantv1.0.1-rc.1
> personal.ecRecover('0x61626364', '0xe67ddbb12ad7c85a28b082bb3f159e637229454d34824bd96c0df38e49bf92d42167ffba7565855585de0c32407b0622b0b66fdfe7bd6566d4a19ca40b39ec631b')
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a" // EIP-191 signature yields the signer address
> personal.ecRecover('0x61626364', '0x90824271750d7a09f90a76b6f8ec1e5e2afd31790fea9f43e26c120fef3152be46ad09c76f87bd6c495859fa37127754f1f0780180df53eda80034dac036b8d31b')
"0x83810e56c2bb4969cc3dffe6a1afeb262cafe7d4" // KIP-97 signature yields an unrelated address
> kaia.recoverFromMessage('0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a', '0x61626364', '0xe67ddbb12ad7c85a28b082bb3f159e637229454d34824bd96c0df38e49bf92d42167ffba7565855585de0c32407b0622b0b66fdfe7bd6566d4a19ca40b39ec631b', 'latest')
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a" // both returns the signer address
> kaia.recoverFromMessage('0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a', '0x61626364', '0x90824271750d7a09f90a76b6f8ec1e5e2afd31790fea9f43e26c120fef3152be46ad09c76f87bd6c495859fa37127754f1f0780180df53eda80034dac036b8d31b', 'latest')
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a" // both returns the signer address
> personal.importRawKey('6397f5bfcef382017268d21294aed3b82d479b67323f94f7065d92a43643f20f', 'pass')
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a"
> personal.unlockAccount('0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a', 'pass')
true
> personal.ecRecover('0x61626364', personal.sign('0x61626364', '0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a', 'pass'))
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a"
> personal.ecRecover('0x61626364', eth.sign('0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a', '0x61626364'))
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a"
> personal.ecRecover('0x61626364', kaia.sign('0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a', '0x61626364'))
"0xbc7d1abe33e6ec19ca873a3042a4dcf49149bc7a" |
gasPrice and maxPriorityFeePerGas APIs - Under low traffic,
setInterval(() => console.log(
eth.blockNumber,
parseInt(eth.gasPrice/1e9),
parseInt(eth.maxPriorityFeePerGas/1e9), '\t',
eth.feeHistory(20, 'latest', [60]).reward.flat().map((n) => parseInt(parseInt(n)/1e9)), '\t',
eth.feeHistory(20, 'latest').baseFeePerGas.map((n) => parseInt(parseInt(n)/1e9))
), 1000)
burst_tx.ts
import hre from "hardhat";
const totalBlock = 25;
const tpb = 5;
async function main() {
const [sender] = await hre.ethers.getSigners();
const initialNonce = await sender.getTransactionCount();
for (let i = 0; i < totalBlock; i++) {
for (let j = 0; j < tpb; j++) {
await sender.sendTransaction({
to: sender.address,
value: hre.ethers.utils.parseEther("0.0001"),
maxFeePerGas: hre.ethers.utils.parseUnits("70", "gwei"),
maxPriorityFeePerGas: hre.ethers.utils.parseUnits("30", "gwei"),
nonce: initialNonce + i * tpb + j,
});
}
await new Promise((resolve) => setTimeout(resolve, 1000));
}
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
}); v1.0.0 - recommends gasPrice=(25+30), tip=30
v1.0.1-rc.1 - recommends gasPrice=(25+0), tip=0
heavy_tx.ts
import hre from "hardhat";
const totalBlock = 5;
const tpb = 2;
const testonce = 0;
/*
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;
contract GasBurner {
uint256[10000] arr;
function consume(uint256 num) public {
for (uint256 i=0; i<num; i++) {
arr[i] += i;
}
}
}
*/
const abi = '[{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"consume","outputs":[],"stateMutability":"nonpayable","type":"function"}]';
const code = '0x6080604052348015600e575f80fd5b506101b48061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063483f31ab1461002d575b5f80fd5b610047600480360381019061004291906100c6565b610049565b005b5f5b8181101561008b57805f826127108110610068576100676100f1565b5b015f828254610077919061014b565b92505081905550808060010191505061004b565b5050565b5f80fd5b5f819050919050565b6100a581610093565b81146100af575f80fd5b50565b5f813590506100c08161009c565b92915050565b5f602082840312156100db576100da61008f565b5b5f6100e8848285016100b2565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61015582610093565b915061016083610093565b92508282019050808211156101785761017761011e565b5b9291505056fea2646970667358221220b7ea334535cbbee97b700012dc6cce67791b4f5333b217b9150e5a3e2b28979664736f6c634300081a0033';
const addr = '0xa921ed8f8d991b1b0cd8ea23ea8eea503a694f02'; // baobab
async function main() {
const [sender] = await hre.ethers.getSigners();
const iface = new hre.ethers.utils.Interface(abi);
const data = iface.encodeFunctionData('consume', [8000]);
let to = addr;
if (to.length == 0) {
const deployTx = await sender.sendTransaction({ data: code });
const deployRc = await deployTx.wait();
to = deployRc.contractAddress;
console.log('GasBurner deployed at', to);
} else {
console.log('Using GasBurner at', to);
}
if (testonce) {
const callTx = await sender.sendTransaction({ to, data })
const callRc = await callTx.wait();
console.log('One call costs', callRc.gasUsed, 'gas');
return;
}
const initialNonce = await sender.getTransactionCount();
for (let i = 0; i < totalBlock; i++) {
let p = [];
for (let j = 0; j < tpb; j++) {
const tx = sender.sendTransaction({
to: to,
data: data,
maxFeePerGas: hre.ethers.utils.parseUnits("27", "gwei"),
maxPriorityFeePerGas: hre.ethers.utils.parseUnits("2", "gwei"),
nonce: initialNonce + i * tpb + j,
});
p.push(tx);
}
await Promise.all(p);
console.log(i);
await new Promise((resolve) => setTimeout(resolve, 100));
}
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
}); v1.0.0
v1.0.1-rc.1 - sudden increases
v1.0.1-rc.3 (temp)
|
The Go RPC client supports type-2 transactions
|
CI packaging pipeline
$ wget https://packages.kaia.io/kaia/v1.0.1~rc.1/kend-v1.0.1~rc.1-0.el7.x86_64.rpm
$ rpm -qlp kend-v1.0.1~rc.1-0.el7.x86_64.rpm
/etc/init.d/kend
/etc/kend/conf/kend.conf
/usr/bin/ken
$ sudo yum remove kend.x86_64 # remove v1.12.1-0.el7 package (if installed)
$ sudo yum install ./kend-v1.0.1~rc.1-0.el7.x86_64.rpm
Installed:
kend.x86_64 0:v1.0.1~rc.1-0.el7
Complete!
$ ken version
Kaia v1.0.1
$ sudo /etc/init.d/kend start
$ sudo ken attach /var/kend/data/klay.ipc
> kaia.clientVersion()
"Klaytn/v1.0.1/linux-amd64/go1.22.1"
$ uname -a
Linux workspace 6.5.0-1020-aws #20~22.04.1-Ubuntu SMP Wed May 1 16:10:50 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ wget https://packages.kaia.io/kaia/v1.0.1~rc.1/ken-v1.0.1~rc.1-0-linux-amd64.tar.gz
$ tar xf ken-v1.0.1~rc.1-0-linux-amd64.tar.gz
$ tree ken-linux-amd64
ken-linux-amd64/
├── bin
│ ├── ken
│ └── kend
└── conf
└── kend.conf
$ cd ken-linux-amd64
$ ./bin/ken version
Kaia v1.0.1~rc.1+1aca7b125c
$ echo "DATA_DIR=data" >> conf/kend.conf && echo "LOG_DIR=logs" >> conf/kend.conf && mkdir -p data && mkdir -p logs
$ ./bin/kend start
$ ./bin/ken attach ./data/klay.ipc
> kaia.clientVersion()
"Klaytn/v1.0.1~rc.1/linux-amd64/go1.22.1" |
Regular test
|
kscn can successfully query the main chain's data via subbridge_parentOperatorBalancev1.0.0:
v1.0.1-rc.1:
|
debug trace
debug_trace RPC test cases (#15)CallTrace formats (see #15)
conf={tracer: 'callTracer'}
debug.traceTransaction('0xf3b71a6f97667dba14aef6d512c9bb01c7af43756e464c57e12b2fdfa7a9d3f2', conf)
debug.traceTransaction('0x49aa6074a3b4970399ef2af12b109c4cb4a65ab8a833d1540e4cefa657a3c0c7', conf)
debug.traceTransaction('0x931c5af31bfb906fc20effa0f90f1a8e66edefac9879729fedd18a65d64a11be', conf)
debug.traceTransaction('0xb71df5a6628cd2c193c5155c4dabbd45604a6207334c793b512293e165a04526', conf)
debug.traceTransaction('0xdf06945964fb2f966c89716bb936da523964c73ee30c0f556baaad90263facfd', conf)
debug.traceTransaction('0xac43859eb4064916e8be8e74645d6019cc48cb6791f68ea21d42ead6bba569b5', conf) chaindatafetcher test (#16)Launch local kafka # Test kafka docker-compose.yml. Not for production.
services:
kafka:
image: bitnami/kafka:3.7
ports:
- "9092:9092"
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: [email protected]:9093
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT Print incoming kafka messages
Setup chaindatafetcher ADDITIONAL="--chaindatafetcher \
--chaindatafetcher.mode kafka \
--chaindatafetcher.kafka.brokers localhost:9092" Call range fetching for the blocks containing debug_trace RPC test cases chaindatafetcher.startRangeFetching(156280235,156280235,'trace')
chaindatafetcher.startRangeFetching(156322608,156322608,'trace')
chaindatafetcher.startRangeFetching(157093750,157093750,'trace')
chaindatafetcher.startRangeFetching(157223508,157223508,'trace')
chaindatafetcher.startRangeFetching(157225294,157225294,'trace')
chaindatafetcher.startRangeFetching(156280549,156280549,'trace') State regen test case (#43)State regeneration
// Test
txid='0x3b0fa88a91ac18b91e0aae17fb85a7d78aad92ffed66803ec7e3b10d3d217878'
block=157805568
idx = 0
conf={tracer: 'callTracer'}
T = debug.traceTransaction(txid, conf).calls[0].value
B = debug.traceBlockByNumber(block, conf)[idx].result.calls[0].value
R = debug.traceBlockByNumberRange(block, block, conf)[block].traces[idx].result.calls[0].value
// Correct value
to = '0x97d88c37e7086decc0a207426fbc38bc9c6e5e3e'
kaia.getAccount(to, block).account.balance
"0xc83bc715f06e921dfa"
kaia.getAccount(to, block-1).account.balance
"0xc678ada73997e4ce4c"
>>> v = 0xc83bc715f06e921dfa - 0xc678ada73997e4ce4c
>>> v, hex(v)
(32505133517088051118, '0x1c3196eb6d6ad4fae') |
istanbul snapshot and staking info
v1.0.1-rc.2 - ERROR messages from the last multiple of 1024 to current block
v1.0.1-rc.3 - creating Istanbul snapshot at startup
Check that archive nodes successfully serve for any block/block range.
console test case
|
go get github.com/kaiachain/kaia
works.Client
can send type-2 transactions with custom gas price & tipkscn
can successfully query the main chain's data viasubbridge_parentOperatorBalance
#27 @hyunsoodadebug.trace*
output is correct #15Sign-Off PR: #40
The text was updated successfully, but these errors were encountered: