How do you change the block times to 5-10s in NXT forked coin?

Hi All!

I'm following this guide on how to create a NXT fork for testing: How to Build Your Own Cryptocurrency (PoS) in Just a Few Minutes | by Sandoche ADITTANE | Learning Lab | Medium

I haven't tested it fully yet, but how do I change the blocktime to 5-10 seconds instead of the default 60 seconds? I'm testing this fork to see if it would work on my web app as the currently 60s on Ardor doesn't work due to the long wait time on block confirmations.


1 Like

Most of the time you will find these kind of hard coded constants in the aptly named Constants java class. Usually you just modify the value and you are good to go. Sometimes there are other implications. Any serious project would require a good understanding of the code base.

About your specific question keep in mind that the block time is not something you can test with a couple of nodes. It's a fundamental parameter that affects the whole network and you won't be able to know in advance if it can be sustainable or you will end up with forking problems preventing the whole network to reach a stable consensus.

Has the testnet at 10s proven reliable so far? its been running for at least a year already on Ardor with 10s blocks.

Yes, but testnet is a very small network (about 20 nodes).

So looks promising but it's not a hard guarantee for a full mainnet network.