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] #2456: Make genesis block unlimited #3074

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Jan 23, 2023

Signed-off-by: Shanin Roman [email protected]

Description of the Change

  • Add const generic to avoid limit check if transaction is part of genesis block.
  • Genesis block early return error if it contains zero accepted transactions.

Issue

Closes #2456.

Benefits

Provide possibility for users to submit large genesis which should play well with block store merge tool.

Possible Drawbacks

User can try to submit too large genesis which would cause issues during network transfer.

Usage Examples or Tests

cargo test --package iroha_core --lib -- tx::tests::genesis_transaction_ignore_limits --exact --nocapture

@Erigara Erigara added Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST labels Jan 23, 2023
@Erigara Erigara self-assigned this Jan 23, 2023
@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #3074 (e0e7fe8) into iroha2-dev (a4d5c9f) will increase coverage by 2.23%.
The diff coverage is 68.01%.

@@              Coverage Diff               @@
##           iroha2-dev    #3074      +/-   ##
==============================================
+ Coverage       62.33%   64.56%   +2.23%     
==============================================
  Files             169      171       +2     
  Lines           31218    33075    +1857     
==============================================
+ Hits            19459    21356    +1897     
+ Misses          11759    11719      -40     
Impacted Files Coverage Δ
cli/src/main.rs 1.09% <0.00%> (ø)
cli/src/torii/mod.rs 27.65% <ø> (ø)
cli/src/torii/utils.rs 75.00% <0.00%> (-9.85%) ⬇️
client_cli/src/main.rs 0.24% <0.00%> (-0.01%) ⬇️
config/base/src/lib.rs 91.57% <ø> (+55.21%) ⬆️
config/src/lib.rs 33.33% <ø> (ø)
config/src/logger.rs 70.21% <ø> (ø)
config/src/path.rs 0.00% <0.00%> (ø)
core/src/lib.rs 100.00% <ø> (ø)
core/src/smartcontracts/isi/block.rs 85.71% <ø> (-3.18%) ⬇️
... and 150 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

core/src/block.rs Outdated Show resolved Hide resolved
core/src/genesis.rs Outdated Show resolved Hide resolved
core/src/genesis.rs Show resolved Hide resolved
mversic
mversic previously approved these changes Jan 23, 2023
mversic
mversic previously approved these changes Jan 23, 2023
appetrosyan
appetrosyan previously approved these changes Jan 23, 2023
core/src/genesis.rs Outdated Show resolved Hide resolved
core/src/genesis.rs Show resolved Hide resolved
@Erigara Erigara merged commit ac35bda into hyperledger-iroha:iroha2-dev Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants