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(core-blockchain): round deletion during rollback #2970

Merged
merged 8 commits into from
Sep 26, 2019

Conversation

spkjp
Copy link
Contributor

@spkjp spkjp commented Sep 25, 2019

Summary

We must only delete rounds greater than the target round during rollback, otherwise we could end up with holes in the table.

Also removes the useless analyseFork state which did nothing.

Fixes #2935

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

Merging #2970 into develop will decrease coverage by 14.91%.
The diff coverage is 60%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #2970       +/-   ##
============================================
- Coverage     68.4%   53.49%   -14.92%     
============================================
  Files          405      404        -1     
  Lines         9829     9828        -1     
  Branches       509      509               
============================================
- Hits          6724     5257     -1467     
- Misses        3065     4536     +1471     
+ Partials        40       35        -5
Impacted Files Coverage Δ
...ackages/core-blockchain/src/machines/blockchain.ts 100% <ø> (ø) ⬆️
.../core-database-postgres/src/postgres-connection.ts 0% <0%> (-69%) ⬇️
packages/core-blockchain/src/state-machine.ts 89.74% <100%> (ø) ⬆️
...ges/core-tester-cli/src/commands/debug/identity.ts 0% <0%> (-100%) ⬇️
...ages/core-api/src/handlers/transactions/methods.ts 0% <0%> (-100%) ⬇️
...s/core-api/src/handlers/shared/schemas/block-id.ts 0% <0%> (-100%) ⬇️
packages/core-tester-cli/src/logger.ts 0% <0%> (-100%) ⬇️
.../core-api/src/handlers/transactions/transformer.ts 0% <0%> (-100%) ⬇️
packages/core-api/src/handlers/peers/schema.ts 0% <0%> (-100%) ⬇️
...kages/core-api/src/handlers/transactions/routes.ts 0% <0%> (-100%) ⬇️
... and 102 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 84aedb1...1e41137. Read the comment docs.

@spkjp spkjp force-pushed the fix/core-blockchain/round-rollback branch from a2a0929 to 6c4dd32 Compare September 25, 2019 04:05
@spkjp spkjp merged commit 4c8f365 into develop Sep 26, 2019
@ghost ghost deleted the fix/core-blockchain/round-rollback branch September 26, 2019 01:08
vasild added a commit that referenced this pull request Sep 27, 2019
…ts-nonce

* ArkEcosystem/core/develop:
  refactor(core-transaction-pool): don't accept expired v1 transactions (#2948)
  fix(core-snapshots): remove bogus skipRoundRows (#2973)
  feat(core-api): endpoints for locks/businesses/bridgechains (#2940)
  fix(core-blockchain): round deletion during rollback (#2970)
  fix: range selection in pool's getTransactions() (#2952)
  feat: expose `isValidPeer` via ajv format rule (#2960)
  chore: remove trailing whitespace (#2971)
  fix(core-transactions): update wallet nonce when applying v1 transaction (#2959)
  fix(core-blockchain): do not reset `noBlockCounter` when `downloadBlocks` succeeds (#2968)
  refactor(pool): remove unnecessary check from validateTransactions() (#2951)
  ci: temporarily disable pull_request.synchronize event (#2966)
  refactor: strengthen a nonce check in performGenericWalletChecks() (#2949)
  ci: setup github action workflow for e2e tests (#2964)
  chore: drop node 11 support (#2965)
  test(e2e): No need to run as root the chmod command when modifying own's files (#2958)
  refactor(crypto): change maximum recipients of multipayment via milestone (#2961)
  ci: split functional job into 1 job per type (#2963)
  refactor(core-p2p): make peer reply errors less verbose (#2962)
  fix(core-state): index recipient wallets during bootstrap (#2947)
  Tell git to ignore vim's temporary files (#2957)
  ci: force exit tests if there are hanging promises
  ci: use different test coverage directories for each type (#2956)
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.

2 participants