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

db-analyser: clean up #2667

Merged
merged 2 commits into from
Oct 7, 2020
Merged

db-analyser: clean up #2667

merged 2 commits into from
Oct 7, 2020

Conversation

mrBliss
Copy link
Contributor

@mrBliss mrBliss commented Oct 6, 2020

  • Fix mainnet vs. testnet bug. Classic boolean blindness: in one place the
    Bool meant "testnet" and in another "mainnet". Fix it by using
    RequiresNetworkMagic instead of Bool.

  • Pass the initial ledger to the analyses. This opens the door for analyses that
    do block and/or header validation.

  • Replace IORefs by threading some state around.

  • Parameterise processAll over BlockComponent. Now, for example,
    showHeaderSize no longer needs to decode the blocks, it just receives the slot
    number and the header size from the indices.

  • Introduce AnalysisEnv.

  • Drop unused dependency on cardano-slotting.

Classic boolean blindness: in one place the `Bool` meant "testnet" and in
another "mainnet". Fix it by using `RequiresNetworkMagic` instead of `Bool`.
* Pass the initial ledger to the analyses. This opens the door for analyses that
  do block and/or header validation.

* Replace `IORef`s by threading some state around.

* Parameterise `processAll` over `BlockComponent`. Now, for example,
  `showHeaderSize` no longer needs to decode the blocks, it just receives the slot
  number and the header size from the indices.

* Introduce `AnalysisEnv`.

* Drop unused dependency on `cardano-slotting`.
@mrBliss mrBliss added the consensus issues related to ouroboros-consensus label Oct 6, 2020
@mrBliss mrBliss requested a review from edsko October 6, 2020 14:34
@mrBliss
Copy link
Contributor Author

mrBliss commented Oct 7, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 7, 2020

@iohk-bors iohk-bors bot merged commit 736ccc6 into master Oct 7, 2020
@iohk-bors iohk-bors bot deleted the mrBliss/db-analyser-improvements branch October 7, 2020 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus issues related to ouroboros-consensus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants