Skip to content

native: adapt dynamic block time#3835

Merged
roman-khimov merged 4 commits intomasterfrom
blocktime-policy
Apr 18, 2025
Merged

native: adapt dynamic block time#3835
roman-khimov merged 4 commits intomasterfrom
blocktime-policy

Conversation

@AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Mar 10, 2025

Close #3745.

@AnnaShaleva AnnaShaleva marked this pull request as ready for review March 12, 2025 12:30
@AnnaShaleva AnnaShaleva force-pushed the blocktime-policy branch 2 times, most recently from 066c578 to 39ff457 Compare March 12, 2025 12:35
@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 83.90805% with 14 lines in your changes missing coverage. Please review.

Project coverage is 82.56%. Comparing base (eedadd0) to head (1d15db3).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
pkg/core/blockchain.go 43.75% 6 Missing and 3 partials ⚠️
pkg/core/native/policy.go 95.45% 1 Missing and 1 partial ⚠️
cli/server/server.go 66.66% 1 Missing ⚠️
pkg/network/tcp_peer.go 0.00% 1 Missing ⚠️
pkg/services/stateroot/validators.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3835      +/-   ##
==========================================
- Coverage   82.61%   82.56%   -0.05%     
==========================================
  Files         342      342              
  Lines       48032    48105      +73     
==========================================
+ Hits        39681    39718      +37     
- Misses       6708     6745      +37     
+ Partials     1643     1642       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AnnaShaleva AnnaShaleva force-pushed the blocktime-policy branch 2 times, most recently from 65f746b to 500381f Compare March 13, 2025 07:57
@AnnaShaleva AnnaShaleva force-pushed the blocktime-policy branch 2 times, most recently from c1e4821 to 1afea7c Compare March 19, 2025 12:56
@AnnaShaleva AnnaShaleva changed the title native: store TimePerBlock setting inside native Policy native: adapt dynamic block time Mar 19, 2025
@AnnaShaleva
Copy link
Member Author

Depends on nspcc-dev/dbft#147.

@AnnaShaleva
Copy link
Member Author

Depends on nspcc-dev/dbft#148.

@AnnaShaleva
Copy link
Member Author

@roman-khimov, please review.

AnnaShaleva added a commit that referenced this pull request Mar 26, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva force-pushed the blocktime-policy branch 3 times, most recently from d6b0d59 to 56570d8 Compare March 26, 2025 16:23
AnnaShaleva added a commit that referenced this pull request Mar 27, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva added the blocked Can't be done because of something label Apr 1, 2025
AnnaShaleva added a commit that referenced this pull request Apr 1, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
AnnaShaleva added a commit that referenced this pull request Apr 1, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva force-pushed the blocktime-policy branch 2 times, most recently from a909ea6 to 2abea29 Compare April 7, 2025 10:56
AnnaShaleva added a commit that referenced this pull request Apr 7, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
AnnaShaleva added a commit that referenced this pull request Apr 16, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva removed the blocked Can't be done because of something label Apr 16, 2025
A part of #3745.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
AnnaShaleva added a commit that referenced this pull request Apr 16, 2025
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva
Copy link
Member Author

@roman-khimov, just for the record, this one is ready for review, let's merge it and I'll update other dependent PRs.

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

How about getversion? It has MillisecondsPerBlock as well.

@AnnaShaleva
Copy link
Member Author

I was sure I've already fixed this code, there was a TODO comment. Seems like a rebase problem.

Close #3745.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Ref.
#3835 (comment),
sub-second write timeout is too harsh for real networks.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva
Copy link
Member Author

How about getversion?

Fixed, and also for stateservice.

@roman-khimov roman-khimov merged commit 3106647 into master Apr 18, 2025
33 of 34 checks passed
@roman-khimov roman-khimov deleted the blocktime-policy branch April 18, 2025 10:11
AnnaShaleva added a commit that referenced this pull request Apr 23, 2025
Should be a part of #3849 and
#3835.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
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.

Decrease block time to 3 seconds on N3 networks

2 participants