polygon-edge icon indicating copy to clipboard operation
polygon-edge copied to clipboard

Introduce block builder

Open ferranbt opened this issue 3 years ago • 1 comments

Description

This PR introduces the block builder object to construct blocks with transactions from the pool. Any consensus protocol will use this object to abstract functionality.

Changes include

  • [ ] Bugfix (non-breaking change that solves an issue)
  • [ ] Hotfix (change that solves an urgent issue, and requires immediate attention)
  • [x] New feature (non-breaking change that adds functionality)
  • [ ] Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • [ ] I have assigned this PR to myself
  • [ ] I have added at least 1 reviewer
  • [ ] I have added the relevant labels
  • [ ] I have updated the official documentation
  • [ ] I have added sufficient documentation in code

Testing

  • [ ] I have tested this code with the official test suite
  • [ ] I have tested this code manually

Manual tests

Please complete this section if you ran manual tests for this functionality, otherwise delete it

Documentation update

Please link the documentation update PR in this section if it's present, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

ferranbt avatar Oct 31 '22 16:10 ferranbt

Codecov Report

Merging #854 (31d123c) into develop (b774553) will decrease coverage by 0.27%. The diff coverage is 9.67%.

:exclamation: Current head 31d123c differs from pull request most recent head ce6cd04. Consider uploading reports for the commit ce6cd04 to get more accurate results

@@             Coverage Diff             @@
##           develop     #854      +/-   ##
===========================================
- Coverage    52.91%   52.64%   -0.28%     
===========================================
  Files          128      133       +5     
  Lines        17268    17511     +243     
===========================================
+ Hits          9137     9218      +81     
- Misses        7469     7627     +158     
- Partials       662      666       +4     
Impacted Files Coverage Δ
blockchain/blockchain.go 51.86% <ø> (-1.38%) :arrow_down:
consensus/ibft/consensus_backend.go 0.00% <0.00%> (ø)
blockbuilder/blockbuilder.go 11.11% <11.11%> (ø)
network/identity/identity.go 18.36% <0.00%> (-0.59%) :arrow_down:
txpool/txpool.go 72.95% <0.00%> (-0.15%) :arrow_down:
state/executor.go 3.86% <0.00%> (-0.04%) :arrow_down:
consensus/ibft/ibft.go 1.60% <0.00%> (-0.02%) :arrow_down:
network/config.go 100.00% <0.00%> (ø)
... and 9 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 31 '22 17:10 codecov[bot]