Skip to content
This repository was archived by the owner on Apr 8, 2022. It is now read-only.

runtime: Cargo feature to make block production faster#127

Merged
TheQuantumPhysicist merged 9 commits intostagingfrom
block-interval
Nov 16, 2021
Merged

runtime: Cargo feature to make block production faster#127
TheQuantumPhysicist merged 9 commits intostagingfrom
block-interval

Conversation

@iljakuklic
Copy link
Contributor

Add a compilation-time feature to shorten the block interval to 3 seconds. Intended mainly for testing.

This is the approach to adjusting block interval that I found easiest to implement. The PR is mainly intended as a discussion starter. Do we want a command-line switch (would require some hacks)? Is this sufficient for testing?

Use cargo build --release --features fast to enable 3s block times.

@iljakuklic iljakuklic added the testing Issues related to testing label Nov 16, 2021
@TheQuantumPhysicist
Copy link
Contributor

OMG... I'm working on this RIGHT NOW... hehe.

Good on you. I just called the feature short-block-time instead. I don't recommend "fast" because it can mean many things.

Add a compilation-time feature to shorten the block interval to
3 seconds. Intended mainly for testing.

Use the `--features short-block-time` switch to Cargo to enable.
@iljakuklic
Copy link
Contributor Author

OMG... I'm working on this RIGHT NOW... hehe.

Good on you. I just called the feature short-block-time instead. I don't recommend "fast" because it can mean many things.

Changed the feature name to yours. Are our code changes now byte-identical? 😄

@TheQuantumPhysicist
Copy link
Contributor

OMG... I'm working on this RIGHT NOW... hehe.
Good on you. I just called the feature short-block-time instead. I don't recommend "fast" because it can mean many things.

Changed the feature name to yours. Are our code changes now byte-identical? 😄

Yep, except that I chose 5 seconds instead of 3. I think the shorter the better though.

I just tested this in the functional tests and this seems to work and the tests are 3x fast. I'll add a commit with CI changes and then we merge. Then we get everyone to rebase on this if it passes here.

@TheQuantumPhysicist TheQuantumPhysicist merged commit 7231f60 into staging Nov 16, 2021
@TheQuantumPhysicist TheQuantumPhysicist deleted the block-interval branch November 16, 2021 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

testing Issues related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants