Skip to content

[Protocol] 3 seconds dbft consensus #190

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Feb 11, 2025

This pr tries to formalize our so called 3-seconds consensus.

It requires hardfork and:

  • reduce the block time from 15 seconds to 3 seconds
  • reduce the gasperblock from 5 GAS to 1 GAS

Affected Configurations:

  • MillisecondsPerBlock: 15000 => 3000
  • MaxTransactionsPerBlock: 512 => 256
  • GasPerBlock:
    • Current: 5 GAS
    • At hardfork: Automatically reduced to 1 GAS
    • Post-hardfork: Configurable by council
  • MaxValidUntilBlockIncrement: 100 => 500?

@roman-khimov
Copy link
Contributor

Isn't it a policy change, rather than a protocol change? Do we track policy changes in NEPs?

@roman-khimov
Copy link
Contributor

Maybe

An Informational NEP describes a NEO design issue, or provides general guidelines or information to the NEO community, but does not propose a new feature. Informational NEPs do not necessarily represent a NEO community consensus or recommendation, so users and implementors are free to ignore Informational NEPs or follow their advice.

But then this means that any mainnet policy changes (like fees) should be described in NEPs. Which would be nice, but are we ready for it?

@AnnaShaleva
Copy link
Member

Which would be nice, but are we ready for it?

It seems that we're not yet ready. We'd better start with NEPs for protocol changes only, because otherwise we'll end up in a very large amount of pending NEPs describing all Neo policies that need to be created/reviewed/approved.

So vote up for not including this change into NEPs.

@cschuchardt88
Copy link
Member

PolicyContract doesn't hold this information. It's a configuration in a file. How else you going to change either setting for privatenet?

@Jim8y Jim8y requested a review from a team March 3, 2025 13:26
shargon
shargon previously approved these changes Mar 3, 2025
Wi1l-B0t
Wi1l-B0t previously approved these changes Mar 3, 2025
@Wi1l-B0t
Copy link

Wi1l-B0t commented Mar 3, 2025

Is it necessary to add a method to get block time?

@superboyiii
Copy link
Member

Yes, we have set then we should have get.

Co-authored-by: Owen <38493437+superboyiii@users.noreply.github.com>
@Jim8y Jim8y dismissed stale reviews from Wi1l-B0t and shargon via 0365d6e March 4, 2025 06:55
Jim8y and others added 2 commits March 4, 2025 15:00
Co-authored-by: Owen <38493437+superboyiii@users.noreply.github.com>
5. Effect on Contracts:
* Contract executions MUST adapt to the new block time for all time-related calculations
* The consensus mechanism MUST read the block time from the Policy contract for each consensus round

Copy link
Member

@superboyiii superboyiii Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
===Events===
====SetBlockGenTime====
<pre>
{
"name": "SetBlockGenTime",
"parameters": [
{
"name": "milliseconds",
"type": "Integer"
}
]
}
</pre>

We'd better add an eventlog in the end of the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants