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

Fix MaxHeaderSize #530

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Fix MaxHeaderSize #530

merged 1 commit into from
Dec 14, 2022

Conversation

torao
Copy link
Contributor

@torao torao commented Dec 13, 2022

Description

MaxHeaderSize represents the maximum size of the Header encoded in ProtocolBuffers (ChannelID seems to be the arbitrary length, so it's treated as 'softmax'); Protobuf encodes integers with variable length, so the size isn't fixed, but the maximum value of the Proof and Round fields added in Ostracon were not calculated to this maximum value.

This PR re-adjust the MaxHeaderSize to be the maximum size that Proof and Round can take. In addition, for clarity, I leave the Tendermint constant of 626 to add/remove the size of the field we have changed for the Header.

Closes: #XXX

@torao torao self-assigned this Dec 13, 2022
@torao torao added the C: bug Classification: Something isn't working label Dec 13, 2022
@torao torao force-pushed the fix/max_header_size branch 2 times, most recently from 2465a95 to 623fcdd Compare December 13, 2022 09:29
@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Merging #530 (8cab382) into main (212d0b3) will increase coverage by 0.05%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
+ Coverage   66.01%   66.07%   +0.05%     
==========================================
  Files         279      279              
  Lines       38028    38028              
==========================================
+ Hits        25106    25128      +22     
+ Misses      11124    11104      -20     
+ Partials     1798     1796       -2     
Impacted Files Coverage Δ
crypto/vrf/vrf_r2ishiguro.go 100.00% <ø> (ø)
types/block.go 77.10% <ø> (ø)
privval/socket_listeners.go 79.72% <0.00%> (-4.06%) ⬇️
privval/signer_listener_endpoint.go 88.88% <0.00%> (-2.39%) ⬇️
types/voter_set.go 85.80% <0.00%> (-0.84%) ⬇️
consensus/state.go 73.24% <0.00%> (-0.59%) ⬇️
p2p/conn/connection.go 79.80% <0.00%> (-0.58%) ⬇️
proxy/multi_app_conn.go 47.66% <0.00%> (ø)
light/client.go 61.71% <0.00%> (+0.45%) ⬆️
p2p/pex/pex_reactor.go 80.28% <0.00%> (+0.61%) ⬆️
... and 3 more

@Mdaiki0730 Mdaiki0730 self-requested a review December 14, 2022 07:12
@torao torao merged commit 39c7f56 into Finschia:main Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: bug Classification: Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants