Finschia / ostracon

Ostracon, a consensus algorithm, is forked from Tendermint Core. We have added VRF to Tendermint BFT. It adds randomness to PoS Validator elections and improves security.
Apache License 2.0
70 stars 28 forks source link

update types/part_set.go #651

Closed mansub-song closed 1 year ago

mansub-song commented 1 year ago

Hi, I'm looking at the ostracon code and came across the annotation that I found awkward. I found that the same comment is described not only in ostracon but also in cometBFT, so I changed cometBFT first and my proposal was approved. Here is the related link: https://github.com/cometbft/cometbft/pull/1056

In types/params.go, the value of BlockPartSizeBytes is 65536 (about 64kB). In the function func NewPartSetFromData(data []byte, partSize uint32) *PartSet in types/part_set.go, the function uses the parameter partSize which is the value of BlockPartSizeBytes. However, the annotation says it's 4kB, so I'm doing a pull request to fix it.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 1 year ago

Codecov Report

Merging #651 (d1b2bee) into main (9959bd3) will decrease coverage by 0.02%. The diff coverage is 80.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #651 +/- ## ========================================== - Coverage 66.12% 66.10% -0.02% ========================================== Files 277 275 -2 Lines 36992 36930 -62 ========================================== - Hits 24462 24414 -48 + Misses 10756 10750 -6 + Partials 1774 1766 -8 ``` | [Impacted Files](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [crypto/crypto.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-Y3J5cHRvL2NyeXB0by5nbw==) | `0.00% <ø> (ø)` | | | [crypto/secp256k1/secp256k1.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-Y3J5cHRvL3NlY3AyNTZrMS9zZWNwMjU2azEuZ28=) | `69.56% <0.00%> (ø)` | | | [crypto/sr25519/pubkey.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-Y3J5cHRvL3NyMjU1MTkvcHVia2V5Lmdv) | `43.58% <0.00%> (+7.69%)` | :arrow_up: | | [state/execution.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c3RhdGUvZXhlY3V0aW9uLmdv) | `66.58% <ø> (ø)` | | | [statesync/stateprovider.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c3RhdGVzeW5jL3N0YXRlcHJvdmlkZXIuZ28=) | `31.20% <ø> (ø)` | | | [types/block.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dHlwZXMvYmxvY2suZ28=) | `79.58% <ø> (ø)` | | | [types/validation.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dHlwZXMvdmFsaWRhdGlvbi5nbw==) | `64.00% <ø> (ø)` | | | [crypto/ed25519/ed25519.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-Y3J5cHRvL2VkMjU1MTkvZWQyNTUxOS5nbw==) | `51.38% <100.00%> (+6.26%)` | :arrow_up: | | [types/part\_set.go](https://app.codecov.io/gh/Finschia/ostracon/pull/651?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dHlwZXMvcGFydF9zZXQuZ28=) | `70.61% <100.00%> (ø)` | | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/Finschia/ostracon/pull/651/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)
zemyblue commented 1 year ago

Thank you @mansub-song for your contribution.