-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Abstract out some of the descriptor Span-parsing helpers #16887
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
|
ACK c072446b5c7fbaabcd17494d1b593b1cb5ebc314, verified it's mostly moved code - new code is just forward declarations, license and include guards. |
|
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. |
|
Concept ACK. Now that these functions are public, would be nice to have unit tests. |
c072446 to
5e69aee
Compare
|
@theStack Be my guest! |
Unit tests for the Span-parsing helpers are ready, will open a PR for them as soon as this one is merged in (I guess it's not possible to open a PR which depends on another PR, right?) |
|
@theStack You can post a commit, and I can include it in my PR. You can also open a PR against my branch. |
👍 Then we can have the tests alongside the changes in the same PR. @theStack obviously your changes remain attributed to you. |
|
@sipa @fanquake Okay, here we go: theStack@f4db52f |
|
Will do next week. |
tests the following four functions:
- Const() [parse constant]
- Func() [parse function]
- Expr() [parse expression]
- Split() [split up a string]
|
Thanks, @theStack; I've included your commit. |
|
The parsing heavy functions |
|
ACK bb36372 Show signature and timestampSignature: Timestamp of file with hash |
|
Pretty straightforward move-only commit and then a commit adding tests, going to merge now. |
bb36372 test: add unit tests for Span-parsing helpers (Sebastian Falbesoner) 5e69aee Add documenting comments to spanparsing.h (Pieter Wuille) 230d43f Abstract out some of the descriptor Span-parsing helpers (Pieter Wuille) Pull request description: As suggested here: #16800 (comment). This moves the Span parsing functions out of the descriptor module, making them more easily usable for other parsers (in particular, in preparation for miniscript parsing). ACKs for top commit: MarcoFalke: ACK bb36372 Tree-SHA512: b5c5c11a9bc3f0a1c2c4cfa22755654ecfb8d4b69da0dc1fb9f04e1556dc0f6ffd87ad153600963279ac465d587d7971b53d240ced802d12693682411ac73deb
… helpers bb36372 test: add unit tests for Span-parsing helpers (Sebastian Falbesoner) 5e69aee Add documenting comments to spanparsing.h (Pieter Wuille) 230d43f Abstract out some of the descriptor Span-parsing helpers (Pieter Wuille) Pull request description: As suggested here: bitcoin#16800 (comment). This moves the Span parsing functions out of the descriptor module, making them more easily usable for other parsers (in particular, in preparation for miniscript parsing). ACKs for top commit: MarcoFalke: ACK bb36372 Tree-SHA512: b5c5c11a9bc3f0a1c2c4cfa22755654ecfb8d4b69da0dc1fb9f04e1556dc0f6ffd87ad153600963279ac465d587d7971b53d240ced802d12693682411ac73deb
…helpers 58d67f1 tests: Add fuzzing harness for descriptor Span-parsing helpers (practicalswift) Pull request description: Add fuzzing harness for descriptor Span-parsing helpers (`spanparsing`). As suggested by a fuzz testing enthusiast in #16887 (comment). **Testing this PR** Run: ``` $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/spanparsing ``` ACKs for top commit: MarcoFalke: re-ACK 58d67f1 Tree-SHA512: 5eaca9fcda2856e0dcfeb4a98a2dc97051ae6251f7642b92fdae3ff96bb95ccb0377ee4e6c6b531e59061983b8d9485a5282467f2ab1d614861f60202a893b1c
… helpers Summary: bitcoin/bitcoin@230d43f --- Partial backport of Core [[bitcoin/bitcoin#16887 | PR16887]] Test Plan: ninja check Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6877
Summary: bitcoin/bitcoin@5e69aee --- Depends on D6877 Partial backport of Core [[bitcoin/bitcoin#16887 | PR16887]] Test Plan: read the comments Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6878
Summary:
tests the following four functions:
- Const() [parse constant]
- Func() [parse function]
- Expr() [parse expression]
- Split() [split up a string]
bitcoin/bitcoin@bb36372
---
Depends on D6878
Concludes backport of Core [[bitcoin/bitcoin#16887 | PR16887]]
Test Plan:
ninja check-bitcoin-util_tests
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6879
…ng helpers Summary: 58d67f1cc068c3779e309dc8a82ce33158c3e5b2 tests: Add fuzzing harness for descriptor Span-parsing helpers (practicalswift) Pull request description: Add fuzzing harness for descriptor Span-parsing helpers (`spanparsing`). As suggested by a fuzz testing enthusiast in bitcoin/bitcoin#16887 (comment). **Testing this PR** Run: ``` $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/spanparsing ``` --- Depends on D6879 Backport of Core [[bitcoin/bitcoin#17113 | PR17113]] Test Plan: cmake -GNinja .. -DENABLE_SANITIZERS="address;fuzzer" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ninja bitcoin-fuzzers link-fuzz-test_runner.py run `./src/test/fuzz/spanparsing` for a few seconds Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6880
As suggested here: #16800 (comment).
This moves the Span parsing functions out of the descriptor module, making them more easily usable for other parsers (in particular, in preparation for miniscript parsing).