Skip to content

fix(core-blockchain): port slot check from master#1985

Merged
faustbrian merged 6 commits intoArkEcosystem:developfrom
spkjp:backport-slot-check
Jan 16, 2019
Merged

fix(core-blockchain): port slot check from master#1985
faustbrian merged 6 commits intoArkEcosystem:developfrom
spkjp:backport-slot-check

Conversation

@spkjp
Copy link
Copy Markdown
Contributor

@spkjp spkjp commented Jan 16, 2019

Proposed changes

Ports the slot check from #1974 to TypeScript.

Unfortunately, devnet needs some new block exceptions and in this case the checks have to be performed in multiple places. So I refactored how we handle such blocks. Now the BlockProcessor will return a new block handler to handle them separately.

Managed to sync my devnet node from 1206609 onwards up to current height. It is possible that there are a few bad blocks below that height.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@spkjp spkjp requested review from faustbrian and kristjank January 16, 2019 02:18
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 16, 2019

Codecov Report

Merging #1985 into develop will increase coverage by 0.08%.
The diff coverage is 67.74%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1985      +/-   ##
===========================================
+ Coverage    38.74%   38.83%   +0.08%     
===========================================
  Files          375      376       +1     
  Lines         8199     8215      +16     
  Branches      1145     1150       +5     
===========================================
+ Hits          3177     3190      +13     
- Misses        5010     5013       +3     
  Partials        12       12
Impacted Files Coverage Δ
packages/crypto/src/crypto/slots.ts 96.42% <ø> (ø) ⬆️
.../core-database-postgres/src/repositories/blocks.ts 0% <0%> (ø) ⬆️
packages/crypto/src/crypto/crypto.ts 93.75% <100%> (+0.08%) ⬆️
...es/core-blockchain/src/utils/validate-generator.ts 100% <100%> (+5.26%) ⬆️
...ages/core-blockchain/src/utils/is-block-chained.ts 100% <100%> (ø) ⬆️
packages/core-blockchain/src/blockchain.ts 77.08% <100%> (+0.61%) ⬆️
packages/core-blockchain/src/state-machine.ts 44.27% <100%> (ø) ⬆️
...s/core-blockchain/src/processor/block-processor.ts 88.09% <20%> (+2.38%) ⬆️
...kchain/src/processor/handlers/exception-handler.ts 37.5% <37.5%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcfa2c7...b35fd42. Read the comment docs.

@faustbrian faustbrian merged commit 5df5ba2 into ArkEcosystem:develop Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants