Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Enhancements #57

Merged
merged 7 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

# NO LONGER MAINTAINED

Since the launch of Kaia Blockchain this repository has been parked in favour of the new open-source projects in [Kaia's Github](https://github.com/kaia-blockchain). Contributors have now moved there continuing with massive open-source contributions to our blockchain ecosystem. A big thank you to everyone who has contributed to this repository. For more information about Klaytn's chain merge with Finschia blockchain please refer to the launching of Kaia blockchain - [kaia.io](http://kaia.io/).

--------


# Transaction Latency Measurement

### 1) Introduction
Expand Down
10 changes: 5 additions & 5 deletions aptos-tx-latency-measurement/sendtx_aptos.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ async function sendTx() {
}
} catch (err) {
const now = new Date();
await sendSlackMsg(`${now}, failed to execute aptos, ${err.toString()}`);
console.log("failed to execute.", err.toString());
await sendSlackMsg(`${now}, failed to execute aptos, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack);
data.error = err.toString();
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -266,19 +266,19 @@ async function main() {
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}
loadConfig();
try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
11 changes: 6 additions & 5 deletions arbitrium-tx-latency-measurement/sendtx_arbitrium.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ async function sendTx() {
// console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
} catch (err) {
const now = new Date();
await sendSlackMsg(`${now}, failed to execute arbitrum, ${err.toString()}`);
console.log("failed to execute.", err.toString());
await sendSlackMsg(`${now}, failed to execute arbitrum, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack);
data.error = err.toString();
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand Down Expand Up @@ -311,6 +311,7 @@ async function l1commitmentprocess(db, hash, createdAt) {
};

const response = await fetch(`${process.env.L1FINALITYSCRAPERURL}/root_end?from_chain=42161&hash=${hash}`);
console.log("l1GoResponseArb", response);
if (!response.ok) {
const postIndex = db.data.posts.findIndex((post) => post.l2TxHash === hash);
if (postIndex !== -1) {
Expand Down Expand Up @@ -361,13 +362,13 @@ async function main() {
await sendTx()
await l1Checker();
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

Expand All @@ -376,5 +377,5 @@ try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions avalanche-tx-latency-measurement/sendtx_avalanche.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ const sendAvax = async (amount, to, maxFeePerGas = undefined, maxPriorityFeePerG
}
} catch(err){
const now = new Date();
await sendSlackMsg(`${now}, failed to execute avalanche, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute avalanche, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand Down Expand Up @@ -273,18 +273,18 @@ async function main(){
try{
await sendAvax("0.0", address);
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendAvax("0.0", address);
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}
try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions bnb-tx-latency-measurement/sendtx_bnb.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ async function sendTx(){
}
} catch(err){
const now = new Date();
await sendSlackMsg(`${now}, failed to execute bnb, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute bnb, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -248,19 +248,19 @@ async function main(){
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions elrond-tx-latency-measurement/sendtx_elrond.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ async function sendTx(){
}
} catch(err){
const now = new Date();
await sendSlackMsg(`${now}, failed to execute elrond, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute elrond, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand Down Expand Up @@ -273,19 +273,19 @@ async function main(){
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions eos-tx-latency-measurement/sendtx_eos.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ async function sendTx(){
}
} catch(err){
const now = new Date();
await sendSlackMsg(`${now}, failed to execute eos, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute eos, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -234,19 +234,19 @@ async function main(){
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions fantom-tx-latency-measurement/sendtx_fantom.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ async function sendTx(){
}
} catch(err){
const now = new Date();
await sendSlackMsg(`${now}, failed to execute fantom, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute fantom, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -269,19 +269,19 @@ async function main(){
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions harmony-tx-latency-measurement/sendtx_harmony.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ async function sendTx() {
}
} catch (err) {
const now = new Date();
await sendSlackMsg(`${now}, failed to execute harmony, ${err.toString()}`);
console.log("failed to execute.", err.toString());
await sendSlackMsg(`${now}, failed to execute harmony, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack);
data.error = err.toString();
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -257,19 +257,19 @@ async function main() {
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions hedera-tx-latency-measurement/sendtx_hedera.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ async function sendTx(){
}
} catch(err){
const now = new Date();
await sendSlackMsg(`${now}, failed to execute hedera, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute hedera, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -235,19 +235,19 @@ async function main(){
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}

try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
10 changes: 5 additions & 5 deletions klaytn-tx-latency-measurement/sendtx_klaytn.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ async function sendTx() {
}
} catch (err) {
const now = new Date();
await sendSlackMsg(`${now}, failed to execute Klaytn, ${err.toString()}`);
console.log("failed to execute.", err.toString())
await sendSlackMsg(`${now}, failed to execute Klaytn, ${err.toString()}, ${err.stack}`);
console.log("failed to execute.", err.toString(), err.stack)
data.error = err.toString()
console.log(`${data.executedAt},${data.chainId},${data.txhash},${data.startTime},${data.endTime},${data.latency},${data.txFee},${data.txFeeInUSD},${data.resourceUsedOfLatestBlock},${data.numOfTxInLatestBlock},${data.pingTime},${data.error}`)
}
Expand All @@ -240,19 +240,19 @@ async function main() {
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}, interval)
try{
await sendTx()
} catch(err){
console.log("failed to execute sendTx", err.toString())
console.log("failed to execute sendTx", err.toString(), err.stack)
}
}
loadConfig();
try{
main()
}
catch(err){
console.log("failed to execute main", err.toString())
console.log("failed to execute main", err.toString(), err.stack)
}
Loading
Loading