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

feat(core-state): in-memory storage for last N blocks and transactions #2492

Merged
merged 13 commits into from
Apr 26, 2019

Conversation

faustbrian
Copy link
Contributor

@faustbrian faustbrian commented Apr 26, 2019

Summary

Implements a map that is capped in size and keeps records in insertion order.

First half of https://github.com/ArkEcosystem/core/issues/2114.

What kind of change does this PR introduce?

  • Bugfix
  • New feature
  • Refactoring / Performance Improvements
  • Build-related changes
  • Documentation
  • Tests / Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
    • All tests are passing
    • All benchmarks are passing without any major regressions
    • Sync from 0 works on mainnet
    • Sync from 0 works on devnet
    • Starting a new network and forging on it work
    • Explorer is fully functional
    • Wallets are fully functional
  • No

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)

@ghost ghost added Complexity: High labels Apr 26, 2019
@ghost
Copy link

ghost commented Apr 26, 2019

The ci/circleci: test-node11-unit job is failing as of ef6a7476d74886ac472603ea8248333a145f9b3f. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@codecov-io
Copy link

codecov-io commented Apr 26, 2019

Codecov Report

Merging #2492 into develop will decrease coverage by <.01%.
The diff coverage is 70.51%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2492      +/-   ##
===========================================
- Coverage    67.76%   67.76%   -0.01%     
===========================================
  Files          386      390       +4     
  Lines         8399     8457      +58     
  Branches       439      402      -37     
===========================================
+ Hits          5692     5731      +39     
- Misses        2654     2673      +19     
  Partials        53       53
Impacted Files Coverage Δ
...ages/core-database/src/database-service-factory.ts 46.15% <ø> (-0.52%) ⬇️
packages/core-blockchain/src/blockchain.ts 54.88% <ø> (ø) ⬆️
packages/core-transaction-pool/src/connection.ts 95.54% <100%> (+0.02%) ⬆️
packages/core-transaction-pool/src/processor.ts 77.46% <100%> (ø) ⬆️
packages/core-utils/src/ordered-capped-map.ts 100% <100%> (ø)
packages/core-state/src/stores/state.ts 93.93% <100%> (ø)
packages/core-transaction-pool/src/memory.ts 95.87% <100%> (ø) ⬆️
packages/core-p2p/src/peer-guard.ts 80% <100%> (-2.5%) ⬇️
packages/core-p2p/src/peer-verifier.ts 82.75% <100%> (ø) ⬆️
packages/core-blockchain/src/state-machine.ts 88.98% <100%> (ø) ⬆️
... and 12 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 5d48f03...111f01c. Read the comment docs.

@faustbrian faustbrian marked this pull request as ready for review April 26, 2019 12:44
spkjp
spkjp previously approved these changes Apr 26, 2019
@faustbrian faustbrian merged commit 86c7762 into develop Apr 26, 2019
@ghost ghost deleted the feat/state-storage branch April 26, 2019 14:51
@ghost ghost removed the Status: In Progress label Apr 26, 2019
vasild added a commit that referenced this pull request Apr 26, 2019
…remove-insertion-order

* ArkEcosystem/core/develop:
  feat(core-state): in-memory storage for last N blocks and transactions (#2492)
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