Skip to content
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

Remove max block time param #3366

Merged
merged 17 commits into from
Jul 5, 2024
Merged

Conversation

sug0
Copy link
Contributor

@sug0 sug0 commented Jun 4, 2024

Describe your changes

Remove the max_expected_time_per_block genesis parameter.

Indicate on which release or other PRs this topic is based on

v0.39.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 81.21547% with 68 lines in your changes missing coverage. Please review.

Project coverage is 54.01%. Comparing base (879a326) to head (48f58aa).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/sdk/src/queries/shell.rs 0.00% 26 Missing ⚠️
crates/sdk/src/masp.rs 0.00% 21 Missing ⚠️
crates/parameters/src/lib.rs 95.18% 13 Missing ⚠️
crates/sdk/src/rpc.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3366      +/-   ##
==========================================
+ Coverage   53.92%   54.01%   +0.09%     
==========================================
  Files         317      317              
  Lines      107575   107839     +264     
==========================================
+ Hits        58011    58254     +243     
- Misses      49564    49585      +21     

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

@sug0 sug0 marked this pull request as draft June 4, 2024 15:20
@sug0 sug0 requested review from murisi, yito88 and grarco June 5, 2024 12:29
@sug0 sug0 marked this pull request as ready for review June 5, 2024 12:29
sug0 added a commit that referenced this pull request Jun 5, 2024
crates/parameters/src/lib.rs Outdated Show resolved Hide resolved
@yito88
Copy link
Member

yito88 commented Jun 5, 2024

I tried IBC e2e tests with the updated Hermes and IBC shielding transfer failed due to MASP VP error: Native VP error: MASP transaction is expired.
The current height + 7 (where default timeout was 3599 sec, max_block_time was 450 in namada_sdk::masp::gen_shielded_transfer) was set to the MASP transaction expiration. The height elapsed in the IBC packet relaying.

sug0 added a commit that referenced this pull request Jun 6, 2024
@sug0 sug0 force-pushed the tiago/remove-max-block-time-param branch from fc02f3c to da17c33 Compare June 6, 2024 08:03
@sug0 sug0 requested a review from tzemanovic June 6, 2024 21:24
let block_timestamps = {
let mut ts = Vec::with_capacity(
usize::try_from({
// NB: cap the allocation to 16
Copy link
Member

Choose a reason for hiding this comment

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

nit: let's note this cap in the rustdoc for this fn and estimate_max_block_time_from_blocks_and_params

tzemanovic
tzemanovic previously approved these changes Jun 7, 2024
@yito88
Copy link
Member

yito88 commented Jun 7, 2024

The IBC E2E tests in CI failed when creating channels. I'm investigating it...

@yito88
Copy link
Member

yito88 commented Jun 7, 2024

hmm, flaky tests... These tests didn't fail locally. After some retries, they passed.

@sug0
Copy link
Contributor Author

sug0 commented Jun 7, 2024

hmm, flaky tests... These tests didn't fail locally. After some retries, they passed.

@yito88 I suppose it's a matter of decreasing the max block time, to increase the amount of delta blocks in the masp tx expiration

@brentstone
Copy link
Collaborator

Is this ready for draft now?

brentstone added a commit that referenced this pull request Jun 10, 2024
* tiago/remove-max-block-time-param:
  update Hermes
  Changelog for #3366
  Add additional test coverage for max expected block times
  Import `namada_storage` with `testing` feat
  Avoid estimating block time of zero
  Test max block time estimates
  Insert mock block headers into test storage
  Split out `estimate_max_block_time_from_parameters`
  Remove max expected block time param
  Retrieve max block time estimate from new rpc method in masp
  Add max block duration estimate rpc method
  Read epochs per year param
  Implement date time subtraction
  Add block header Namada rpc handler
sug0 added a commit that referenced this pull request Jun 13, 2024
@sug0 sug0 force-pushed the tiago/remove-max-block-time-param branch from 7ed0ef6 to 2b6d0eb Compare June 13, 2024 12:54
@sug0 sug0 marked this pull request as draft June 13, 2024 15:10
@sug0
Copy link
Contributor Author

sug0 commented Jun 13, 2024

still messing around with timeout values to avoid flakes in ci

sug0 added a commit that referenced this pull request Jun 13, 2024
@sug0 sug0 force-pushed the tiago/remove-max-block-time-param branch from 2b6d0eb to df9c095 Compare June 13, 2024 15:11
@sug0 sug0 force-pushed the tiago/remove-max-block-time-param branch from df9c095 to 48f58aa Compare June 14, 2024 09:26
@sug0
Copy link
Contributor Author

sug0 commented Jun 14, 2024

@brentstone I think this is less flakey now. should be ok to merge

@sug0 sug0 marked this pull request as ready for review June 14, 2024 10:10
brentstone added a commit that referenced this pull request Jun 14, 2024
* tiago/remove-max-block-time-param:
  Changelog for #3366
  Adjust IBC timeout values
  Clue IBC max block time estimate from Namada params
  Decrease max block time estimate to 1m
  update Hermes
  Add additional test coverage for max expected block times
  Import `namada_storage` with `testing` feat
  Avoid estimating block time of zero
  Test max block time estimates
  Insert mock block headers into test storage
  Split out `estimate_max_block_time_from_parameters`
  Remove max expected block time param
  Retrieve max block time estimate from new rpc method in masp
  Add max block duration estimate rpc method
  Read epochs per year param
  Implement date time subtraction
  Add block header Namada rpc handler
@brentstone brentstone merged commit f479d3d into main Jul 5, 2024
17 of 19 checks passed
@brentstone brentstone deleted the tiago/remove-max-block-time-param branch July 5, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants