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

Refactor utreexo/cmd/ #85

Closed
wants to merge 2 commits into from

Conversation

kcalvinalvin
Copy link
Member

@kcalvinalvin kcalvinalvin commented Feb 23, 2020

Everything in utreexo/cmd/ is refactored.

While reviewing code to do the TODOs mentioned in #79, I noticed some things to clean up.

This refactor is needed for the goals mentioned in #79 as it separates

  1. Bridge node and CSN (Compact State Node)
  2. Chain resume functionality from both bridgenode and csn (placed in chain.go and chainio.go in both bridgenode/ and csn/

Changed things

  1. All functionality for store and restore to disk is now placed in chain.go and chainio.go in both bridgenode/ and csn/

  2. Various bugs involving offsetfile.go was fixed. To add new blocks from blk*.dat files, all the user has to do is delete the offsetdata directory and re-run genproofs to rebuild the offset index. Both genproofs and ibdsim will resume where they left off and sync the new blocks.

  3. main.go file in directory cmd/ is the main file now.

  4. Separated all ttl related things to its own directory.

  5. Updated readme.md in utreexo/cmd/ and in utreexo/

  6. Removed all names related or implying a simulator.

  7. Various comment cleanups in all files

Everything is refactored.

While reviewing code to do the TODOs mentioned
in mit-dci#79, I noticed some things to clean up.

This refactor is needed for the goals mentioned
in mit-dci#79 as it separates

1. Bridge node and CSN (Compact State Node)
2. Chain resume functionality from both bridgenode and csn
(placed in chain.go and chainio.go in both bridgenode/ and csn/

Changed things

1. All functionality for store and restore to disk is now placed in
chain.go and chainio.go in both bridgenode/ and csn/

2. Various bugs involving offsetfile.go was fixed. To add new blocks
from blk*.dat files, all the user has to do is delete the offsetdata
directory and re-run genproofs to rebuild the offset index. Both
genproofs and ibdsim will resume where they left off and sync the
new blocks.

3. main.go file in directory cmd/ is the main file now.

4. Separated all ttl related things to its own directory.

5. Removed all names related or implying a simulator.

6. Various comment cleanups
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.

1 participant