Skip to content

Conversation

w0xlt
Copy link
Contributor

@w0xlt w0xlt commented Jan 29, 2022

As #18689 is labeled "Up for grabs" , this PR proposes a modified version of it.

The changes (from the original) are :
. RPC has been simplified. It now has only one additional parameter (human_readable=true/false).
. The CreateUTXOSnapshot signature has been simplified, with reduced number of parameters and coinascii_cb_t data type has been removed.
. The functional test verifies the content of the human-readable file.

The generated file, however, is the same.

To test:
./src/bitcoin-cli dumptxoutset utxo.txt true

@w0xlt w0xlt force-pushed the feature-utxo-ascii branch from 11d03f7 to e89029e Compare January 29, 2022 16:34
@w0xlt w0xlt force-pushed the feature-utxo-ascii branch 2 times, most recently from 8426bda to 4ad72ef Compare January 30, 2022 03:50
Copy link
Contributor

@shaavan shaavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

I like the idea of allowing the option to dumptxoutset in human-readable data. Also, at first glance, the code looks very clean. Great work! @w0xlt.

I shall post my complete review after thoroughly reviewing this PR. In the meantime, I found some nit suggestions that might help make this PR even better.

@w0xlt w0xlt force-pushed the feature-utxo-ascii branch from 53c1662 to 4cef616 Compare January 30, 2022 13:00
Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 4cef616
(MacOS 12)

./src/bitcoin-cli dumptxoutset utxo.txt true

{
  "coins_written": 40495,
  "base_hash": "000000002cb3254c66a5510fe4b921d5e5d72e85b5111455365f519dee915ce3",
  "base_height": 48205,
  "path": "/Users/brunogarcia/Library/Application Support/Bitcoin/utxo.txt",
  "txoutset_hash": "a4d1ef75d84b1dbda8df305661ef8e8bbcc3fc86e12e4d425255eaf04030100c",
  "nchaintx": 48821
}

I checked the file content and seems right.

Ran again and got:

error code: -8
error message:
/Users/brunogarcia/Library/Application Support/Bitcoin/utxo.txt already exists. If you are sure this is what you want, move it out of the way first 

w0xlt and others added 2 commits February 8, 2022 22:41
Co-authored-by: Shashwat Vangani <shaavan.github@gmail.com>
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
Co-authored-by: brunoerg <brunoely.gc@gmail.com>
@w0xlt w0xlt force-pushed the feature-utxo-ascii branch from e7b3b6d to 1053636 Compare February 9, 2022 02:22
@w0xlt
Copy link
Contributor Author

w0xlt commented Feb 9, 2022

@luke-jr , I accepted your suggestions. While I personally prefer simpler RPC (something like dumptxoutset utxo.csv "csv", as I proposed earlier), I don't have a strong opinion on this. If other reviewers want to discuss it, we can eventually change it.

I tried merging your commits first, but when I dropped the previous commits, this caused a lot of conflicts. So I reset and re-commit. If you prefer another approach, let me know.

@w0xlt w0xlt marked this pull request as ready for review February 9, 2022 02:55
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 24, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24732 (Remove buggy and confusing IncrementExtraNonce by MarcoFalke)
  • #24456 (blockman: Properly guard blockfile members by dongcarl)
  • #22564 (refactor: Move mutable globals cleared in ::UnloadBlockIndex to BlockManager by dongcarl)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@theStack
Copy link
Contributor

Concept ACK

I think on the long-term writing a database (e.g. sqlite) would be even more helpful, as a text file in the size of multiple giga-bytes is relatively hard to handle without an index. But this is obviously out-of-scope for this PR and probably can also be solved by a script that creates the database with the human-readable data as input.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 6, 2022

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?
  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@achow101
Copy link
Member

Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants