8000 GitHub - trick77/multichain-blocktime-sim
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

trick77/multichain-blocktime-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

multichain-blocktime-sim

A quick hack I once wrote to play around with different average block times for a multichain. It's based on the idea that every time a block of a bridged (or child) chain is mined, a block in the bridging chain has to be mined as well, containing the block headers of the child chain block.

Build & run

mvn clean package exec:java
.
.
.
time=10 blockcollider.height=1 (average=10.0) btc.height=0 eth.height=0 lsk.height=1 neo.height=0 
time=14 blockcollider.height=2 (average=7.0) btc.height=0 eth.height=1 lsk.height=1 neo.height=0 
time=20 blockcollider.height=3 (average=6.6666665) btc.height=0 eth.height=1 lsk.height=2 neo.height=0 
time=28 blockcollider.height=4 (average=7.0) btc.height=0 eth.height=2 lsk.height=2 neo.height=0 
time=30 blockcollider.height=5 (average=6.0) btc.height=0 eth.height=2 lsk.height=3 neo.height=0 
time=40 blockcollider.height=6 (average=6.6666665) btc.height=0 eth.height=2 lsk.height=4 neo.height=0 
time=42 blockcollider.height=7 (average=6.0) btc.height=0 eth.height=3 lsk.height=4 neo.height=0 
time=50 blockcollider.height=8 (average=6.25) btc.height=0 eth.height=3 lsk.height=5 neo.height=0 
.
.
.
The average block time for the base chain is 5.269079 seconds (after 4964400 seconds)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0