-
Notifications
You must be signed in to change notification settings - Fork 38.7k
move-only: move coins statistics utils out of RPC #16728
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
Conversation
maflcko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
|
Thanks for the quick feedback @MarcoFalke. Fixed and pushed. |
0afc435 to
07da7c4
Compare
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 07da7c4
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
07da7c4 to
4a76e68
Compare
|
Pushed fixes for feedback from Marco and Russ. |
4a76e68 to
8f394b5
Compare
ariard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested ACK 8f394b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 8f394b5. Happy to see more RPC code move to a seperate and reusable spot. gettxoutsetinfo still works.
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, verified it's almost moved-only.
These procedures will later be used in the ChainstateManager to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots.
8f394b5 to
8a3b2eb
Compare
|
Thanks for the reviews and suggestions, everyone. I've cleaned up some of the imports and reverted the |
|
ACK 8a3b2eb, checked --color-moved=dimmed-zebra Show signature and timestampSignature: Timestamp of file with hash |
|
|
||
| #include <amount.h> | ||
| #include <coins.h> | ||
| #include <chain.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit sort ![]()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be done the next time this file is touched.
|
This will be merged after one more ACK |
|
ACK |
8a3b2eb move-only: move coins statistics utils out of RPC (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: #15606 Issue: #15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal --- In the short-term, this move-only commit will help with fuzzing (#15606 (comment)). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots. Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it. ACKs for top commit: MarcoFalke: ACK 8a3b2eb, checked --color-moved=dimmed-zebra Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74
8a3b2eb move-only: move coins statistics utils out of RPC (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: bitcoin#15606 Issue: bitcoin#15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal --- In the short-term, this move-only commit will help with fuzzing (bitcoin#15606 (comment)). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots. Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it. ACKs for top commit: MarcoFalke: ACK 8a3b2eb, checked --color-moved=dimmed-zebra Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74
Updated the moved code from bitcoin/bitcoin#16728 for Namecoin changes (split of UTXO amount into coin+name value).
Summary: These procedures will later be used in the ChainstateManager to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots. --- This is a backport of Core [[bitcoin/bitcoin#16728 | PR16728]] Test Plan: ninja check-all Reviewers: #bitcoin_abc, Fabien, deadalnix Reviewed By: #bitcoin_abc, Fabien, deadalnix Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D6147
8a3b2eb move-only: move coins statistics utils out of RPC (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: bitcoin#15606 Issue: bitcoin#15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal --- In the short-term, this move-only commit will help with fuzzing (bitcoin#15606 (comment)). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots. Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it. ACKs for top commit: MarcoFalke: ACK 8a3b2eb, checked --color-moved=dimmed-zebra Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74
* Backport Statoshi This backports some of https://github.com/jlopp/statoshi. Missing stuff: README.md and client name changes, segwit and fee estimation stats. Fix RejectCodeToString Fix copy-paste mistake s/InvalidBlockFound/InvalidChainFound/ * Merge bitcoin#16728: move-only: move coins statistics utils out of RPC 8a3b2eb move-only: move coins statistics utils out of RPC (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: bitcoin#15606 Issue: bitcoin#15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal --- In the short-term, this move-only commit will help with fuzzing (bitcoin#15606 (comment)). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots. Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it. ACKs for top commit: MarcoFalke: ACK 8a3b2eb, checked --color-moved=dimmed-zebra Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74 * Fix 16728 * Modernize StatsdClient - Reuse some functionality from netbase - Switch from GetRand to FastRandomContext - Drop `using namespace std` and add `// namespace statsd` * Introduce PeriodicStats and make StatsdClient configurable via -stats<smth> (enabled/host/port/ns/period) * Move/rename tip stats from CheckBlock to ConnectBlock * Add new false positives to lint-format-strings.py * Add snprintf in statsd_client to the list of known violations in lint-locale-dependence.sh * Fix incorrect include guard * Use bracket syntax includes * Replace magic numbers with defaults * Move connection stats calculation into its own function And bail out early if stats are disabled * assert in PeriodicStats Co-authored-by: PastaPastaPasta <[email protected]> Co-authored-by: MarcoFalke <[email protected]> Co-authored-by: PastaPastaPasta <[email protected]>
This is part of the assumeutxo project:
Parent PR: #15606
Issue: #15605
Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal
In the short-term, this move-only commit will help with fuzzing (#15606 (comment)). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots.
Most easily reviewed with
git ... --color-moved=dimmed_zebra. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it.