Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#25369: Unsubtree Univalue
Browse files Browse the repository at this point in the history
d873ff9 refactor: cleanups post unsubtree'ing univalue (fanquake)
e2aa704 refactor: un-subtree univalue (fanquake)

Pull request description:

  At this point, maintaining Univalue as a subtree doesn’t serve much purpose, other than being an inconvenience for making changes to the code (along with polluting our repo with a number of files we don’t use). Our [Univalue fork](https://github.com/bitcoin-core/univalue-subtree) currently deviates from the [upstream API](https://github.com/jgarzik/univalue), and for some time has been marked as not-maintained for use by other projects (I'm not aware of any that use it). The upstream Univalue is not maintained, and has not been for some time. There are no new releases, bugs remain unfixed, and PR's we've upstreamed, https://github.com/jgarzik/univalue/pulls, are not being commented on/merged.

  Another substantial benefit of no-longer maintaining a subtree is removing the rather awkward work-flow currently required to make changes to the Univalue code, particularly breaking changes / introducing new features, e.g. bitcoin-core/univalue-subtree#27. We need to dance around and merge changes to our fork, with a flag, then pull them down here, then switch to using the new code, then go back to our Univalue repo, and remove the old code / flag, then pull the repo down here again, and remove our usage of the flag. Quite the overcomplicated mess.

  With this PR I'm proposing we stop treating Univalue like a subtree, or upstream project/fork, and going forward, treat it as part of this codebase, which we can refactor directly (with pulls to this repo. Ideally, after this is merged, our univalue subtree repo could be marked as "archived". In this repo, I think there is a good chance that the Univalue code will ultimately be refactored away into "modern" C++, i.e using `std::variant` (at least one person has played around with doing this).

  Univalue history:
  - Subtree first introduced: bitcoin/bitcoin#6637
  - `--system-univalue` option introduced: bitcoin/bitcoin#7349
    Suggestion was to use system Univalue by default.
    This was pushed back on by contributors, as well as the [upstream Univalue](https://github.com/jgarzik/univalue) maintainer (jgarzik).
  - Our fork's README was updated to say `It is not maintained for usage by other projects. Notably, the API may break in non-backward-compatible ways.` : bitcoin-core/univalue-subtree#17
  - Our fork README additionally updated to say `the API is broken in non-backward-compatible ways.` : bitcoin-core/univalue-subtree#30
  - `--system-univalue` option removed: bitcoin/bitcoin#22646
  - Univalue "subtree" removed: This PR.

  Guix Build (x86_64):
  ```bash
  06748985a9a386457d10a411b5afe1d59536e5653ec9c5bc8ac8410cd715d073  guix-build-d873ff96e51a/output/aarch64-linux-gnu/SHA256SUMS.part
  57d81891f6d4ae417dd3bcbfc90839600e103da9c7d7b09dbebb82f0119241f3  guix-build-d873ff96e51a/output/aarch64-linux-gnu/bitcoin-d873ff96e51a-aarch64-linux-gnu-debug.tar.gz
  7bb70d3b67253f5e8e5af8158bbf1b4b3e25e782f951d3defb7976534ae67d62  guix-build-d873ff96e51a/output/aarch64-linux-gnu/bitcoin-d873ff96e51a-aarch64-linux-gnu.tar.gz
  b1acb90877d6e3b8d4bd2d57103889e0474263e4153f302eba8cb304fd1aecd7  guix-build-d873ff96e51a/output/arm-linux-gnueabihf/SHA256SUMS.part
  91f9f65aebc131522cae5b523359c62e402a2c929670e1cca19d6a2760d29e04  guix-build-d873ff96e51a/output/arm-linux-gnueabihf/bitcoin-d873ff96e51a-arm-linux-gnueabihf-debug.tar.gz
  1fc3ed39bfc95592503b8dd11f468240deca4fb757f9adb08a0f07f5c0690837  guix-build-d873ff96e51a/output/arm-linux-gnueabihf/bitcoin-d873ff96e51a-arm-linux-gnueabihf.tar.gz
  a5cf5bd0ee0de92fb03f6bca91cfa6667ed77885112e71dd92a82bbd8670141e  guix-build-d873ff96e51a/output/arm64-apple-darwin/SHA256SUMS.part
  f6715399cebb5ac0a09f190fe805146c13d1e8eba57401541d0628da3badc588  guix-build-d873ff96e51a/output/arm64-apple-darwin/bitcoin-d873ff96e51a-arm64-apple-darwin-unsigned.dmg
  07cf82cab4e459ed4e862fc3a2903e49ac750adc6b6fe0534ec165f00e666230  guix-build-d873ff96e51a/output/arm64-apple-darwin/bitcoin-d873ff96e51a-arm64-apple-darwin-unsigned.tar.gz
  81bc076aa415183109e2848fa3cc0265b34f6af3e75b76bcbc6cff524db76a0f  guix-build-d873ff96e51a/output/arm64-apple-darwin/bitcoin-d873ff96e51a-arm64-apple-darwin.tar.gz
  8751b05a3395d668e31217c92cbce9c131aa3566b3784a7e3544adf34fc89fe8  guix-build-d873ff96e51a/output/dist-archive/bitcoin-d873ff96e51a.tar.gz
  526b7780a16a3de3c6006606d3d7a8c2ca565ef28669e2f6f303349a252e4977  guix-build-d873ff96e51a/output/powerpc64-linux-gnu/SHA256SUMS.part
  ff917a50d2b20d41a5954e1ba1e8fb39498a9c8867828483af3f501573148ede  guix-build-d873ff96e51a/output/powerpc64-linux-gnu/bitcoin-d873ff96e51a-powerpc64-linux-gnu-debug.tar.gz
  0311455c821ad392013fc3999a2b2d027fdb5c28e7eb6c3fea9cec29f3730d2d  guix-build-d873ff96e51a/output/powerpc64-linux-gnu/bitcoin-d873ff96e51a-powerpc64-linux-gnu.tar.gz
  983c2553990eb7cebb26e1a0a3e5a9308259dea60d0b64ab6782892d02a7abc1  guix-build-d873ff96e51a/output/powerpc64le-linux-gnu/SHA256SUMS.part
  aba604827d969348671ec3f36dbf37469292715d3f756a7f44a0a5243dbe02f3  guix-build-d873ff96e51a/output/powerpc64le-linux-gnu/bitcoin-d873ff96e51a-powerpc64le-linux-gnu-debug.tar.gz
  e450bd82020d5086f3bb0a23181263315cc05eaf6e5809d0a2115bff4e7ddb2e  guix-build-d873ff96e51a/output/powerpc64le-linux-gnu/bitcoin-d873ff96e51a-powerpc64le-linux-gnu.tar.gz
  476e8e2c80498b241af154abd9112bd2767110c0d6d7e9fa11761de716cb760f  guix-build-d873ff96e51a/output/riscv64-linux-gnu/SHA256SUMS.part
  a76435b3492efcd9af47ad652170605fad50691fd5aff2b46bce0bd08014879e  guix-build-d873ff96e51a/output/riscv64-linux-gnu/bitcoin-d873ff96e51a-riscv64-linux-gnu-debug.tar.gz
  83985d409cd90bf7120cf7902ee442595d28a1469b7c600b666ef901981e5190  guix-build-d873ff96e51a/output/riscv64-linux-gnu/bitcoin-d873ff96e51a-riscv64-linux-gnu.tar.gz
  61c89850244ddf5813ff80c242eff89925d30bccadfa5cb63e968c3af49eb964  guix-build-d873ff96e51a/output/x86_64-apple-darwin/SHA256SUMS.part
  cd219fab8918b061a342357d298aca0c044feb34c6d50a7851d5d3bf18cec267  guix-build-d873ff96e51a/output/x86_64-apple-darwin/bitcoin-d873ff96e51a-x86_64-apple-darwin-unsigned.dmg
  1170d3fdb199fbfca2c20b2a77cc81a6fe24b7e4973543a4461e887f14ac68e9  guix-build-d873ff96e51a/output/x86_64-apple-darwin/bitcoin-d873ff96e51a-x86_64-apple-darwin-unsigned.tar.gz
  71e93297ed8c581a7ed32a6948ef7b1ea2e7c43cb054181de3b5f604f7a2c28b  guix-build-d873ff96e51a/output/x86_64-apple-darwin/bitcoin-d873ff96e51a-x86_64-apple-darwin.tar.gz
  fc8b7b670de9d175775e73df47dc855581c873a9be4adf1d81a4dbb2831d5348  guix-build-d873ff96e51a/output/x86_64-linux-gnu/SHA256SUMS.part
  5703b02c2647f9997aa5ca12514d6a54b1eb2e29046223ca062383326b95894f  guix-build-d873ff96e51a/output/x86_64-linux-gnu/bitcoin-d873ff96e51a-x86_64-linux-gnu-debug.tar.gz
  bab4b932b83476cf6fc2e0b5bf0d2203287f7fd0d1a968e325f2edd5b1d8415b  guix-build-d873ff96e51a/output/x86_64-linux-gnu/bitcoin-d873ff96e51a-x86_64-linux-gnu.tar.gz
  5d180b0415fa8e825d46928c168cb1ae6e27016841b2ff8e190bf13879a5545c  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/SHA256SUMS.part
  d469695a32f6414b25fef7b5fdfda4d854071450ba25148a1dce468114fa9057  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64-debug.zip
  2e7d4e533a5998863c115c586c61b75b4039cd329e12ed24cff78b7f16b6ea57  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64-setup-unsigned.exe
  3dabbd627b532beef57c3d4b5bd30c93c5ea74c492918484cf24685aca8d7bc4  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64-unsigned.tar.gz
  3a40660fba08f7632efd1f73c198f8298db33eab6ef5eaca88b997d95fc31f29  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  0e764679199358fc321dcfcb58c6302e6518f55b3fd27bdd47f2da2a826ba16a  guix-build-d873ff96e51a/output/arm-linux-gnueabihf/SHA256SUMS.part
  5955d28e6d56e5a3297dab723b8478f1b0bb7f5b86476c581339122f34cc7f14  guix-build-d873ff96e51a/output/arm-linux-gnueabihf/bitcoin-d873ff96e51a-arm-linux-gnueabihf-debug.tar.gz
  49c68bc0066f709be68f1e5731425d51fb3cb8062a24aa9fa599987165759cad  guix-build-d873ff96e51a/output/arm-linux-gnueabihf/bitcoin-d873ff96e51a-arm-linux-gnueabihf.tar.gz
  ca678d4eb27c9fa3c527211c0ccb145322a15f327545b5c82f1d1b8d3c310e5a  guix-build-d873ff96e51a/output/arm64-apple-darwin/SHA256SUMS.part
  38366d7fbd769b426f1097e966abe39f01a7ce743f6af1cd0f228b1801d3c87f  guix-build-d873ff96e51a/output/arm64-apple-darwin/bitcoin-d873ff96e51a-arm64-apple-darwin-unsigned.dmg
  0c05dc9c17f5d8237b3e003c2e4c715455c3868bd4cd014e2a15ceb152b27b9c  guix-build-d873ff96e51a/output/arm64-apple-darwin/bitcoin-d873ff96e51a-arm64-apple-darwin-unsigned.tar.gz
  32676e1f9f07f3f77143f8b6038c943da6ba93b081232ec52c2ff940f9f7cc88  guix-build-d873ff96e51a/output/arm64-apple-darwin/bitcoin-d873ff96e51a-arm64-apple-darwin.tar.gz
  8751b05a3395d668e31217c92cbce9c131aa3566b3784a7e3544adf34fc89fe8  guix-build-d873ff96e51a/output/dist-archive/bitcoin-d873ff96e51a.tar.gz
  bdae66515060cab0b362784f0b2019b77da0435f1732d3c91fabcfb5e8c675f6  guix-build-d873ff96e51a/output/powerpc64-linux-gnu/SHA256SUMS.part
  8d837391310b4cdec2296a6e78a9f9b3ea2b3da7870881a5cedf86a3429c08c6  guix-build-d873ff96e51a/output/powerpc64-linux-gnu/bitcoin-d873ff96e51a-powerpc64-linux-gnu-debug.tar.gz
  efe825d6f36338bd4c0b427901b72d666f819858fb241a4211f03bbb738f6961  guix-build-d873ff96e51a/output/powerpc64-linux-gnu/bitcoin-d873ff96e51a-powerpc64-linux-gnu.tar.gz
  7494cf8c5f384ca3205b3ed44dd4c0edebcb9e0a6bf9c8e649fc6d99cc5a10b2  guix-build-d873ff96e51a/output/powerpc64le-linux-gnu/SHA256SUMS.part
  8ceeb21d7fce9e164dbb47b35d0551b59819075fc44dcea39603132340f80c41  guix-build-d873ff96e51a/output/powerpc64le-linux-gnu/bitcoin-d873ff96e51a-powerpc64le-linux-gnu-debug.tar.gz
  bfbbb20dc4e7b30444a52f5f57b5789b5d1edee80abdc8066129b48c59ee65c9  guix-build-d873ff96e51a/output/powerpc64le-linux-gnu/bitcoin-d873ff96e51a-powerpc64le-linux-gnu.tar.gz
  65d578b81b00a1032039362dc6be1a71368f390188e0f948829afd03b8858ed2  guix-build-d873ff96e51a/output/riscv64-linux-gnu/SHA256SUMS.part
  e5233d7e7a8832893ff414c78eb3d4bca3ae30d1a1f789a23419c6739b203022  guix-build-d873ff96e51a/output/riscv64-linux-gnu/bitcoin-d873ff96e51a-riscv64-linux-gnu-debug.tar.gz
  fb6d9f5a063dc7752fcc2acc95a0052322d7c8c86d2c6373e0ceb949dcf22f49  guix-build-d873ff96e51a/output/riscv64-linux-gnu/bitcoin-d873ff96e51a-riscv64-linux-gnu.tar.gz
  61c89850244ddf5813ff80c242eff89925d30bccadfa5cb63e968c3af49eb964  guix-build-d873ff96e51a/output/x86_64-apple-darwin/SHA256SUMS.part
  cd219fab8918b061a342357d298aca0c044feb34c6d50a7851d5d3bf18cec267  guix-build-d873ff96e51a/output/x86_64-apple-darwin/bitcoin-d873ff96e51a-x86_64-apple-darwin-unsigned.dmg
  1170d3fdb199fbfca2c20b2a77cc81a6fe24b7e4973543a4461e887f14ac68e9  guix-build-d873ff96e51a/output/x86_64-apple-darwin/bitcoin-d873ff96e51a-x86_64-apple-darwin-unsigned.tar.gz
  71e93297ed8c581a7ed32a6948ef7b1ea2e7c43cb054181de3b5f604f7a2c28b  guix-build-d873ff96e51a/output/x86_64-apple-darwin/bitcoin-d873ff96e51a-x86_64-apple-darwin.tar.gz
  46e9b067ec385ee14642aebc5ec09d7d2382e0204eeb17dc64587013eddd5dff  guix-build-d873ff96e51a/output/x86_64-linux-gnu/SHA256SUMS.part
  23278b19daac51e7df65b817b79fc93562d0f4eb193ef87472456f4bed1464d7  guix-build-d873ff96e51a/output/x86_64-linux-gnu/bitcoin-d873ff96e51a-x86_64-linux-gnu-debug.tar.gz
  4d5e5e23f089a59185f62faf367d8ca86476e406e6b7bbc9e8950cd89d94534d  guix-build-d873ff96e51a/output/x86_64-linux-gnu/bitcoin-d873ff96e51a-x86_64-linux-gnu.tar.gz
  eec8ab97ee9aceef8cb4e7cb5026225ffc5c7b8e8a6d376e8348020000e5af88  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/SHA256SUMS.part
  a31819e67c373f30eafce8dbcb3d6d0c61d1dcf59c51023aa79321934f8a7d2a  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64-debug.zip
  2e7d4e533a5998863c115c586c61b75b4039cd329e12ed24cff78b7f16b6ea57  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64-setup-unsigned.exe
  3dabbd627b532beef57c3d4b5bd30c93c5ea74c492918484cf24685aca8d7bc4  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64-unsigned.tar.gz
  ec438531b4694913dbbf7c91920dcbd957354b164f807867c16a001898edf669  guix-build-d873ff96e51a/output/x86_64-w64-mingw32/bitcoin-d873ff96e51a-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Code review ACK d873ff9
  MarcoFalke:
    re-ACK d873ff9 only changes: 📼

Tree-SHA512: fc7d781e8cc0fc0a0080eb4b5019e91c55275e087149ed3b5abc6b691170b0ab76f1dd3ce9bb8846eef023897a89123e14751ce8facf2a170829858199904bff
  • Loading branch information
MacroFake committed Jun 16, 2022
2 parents d683221 + d873ff9 commit 8035b5c
Show file tree
Hide file tree
Showing 33 changed files with 32 additions and 1,345 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ src/obj
share/setup.nsi
share/qt/Info.plist

src/univalue/gen

src/qt/*.moc
src/qt/moc_*.cpp
src/qt/forms/ui_*.h
Expand Down
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ LCOV_FILTER_PATTERN = \
-p "src/leveldb/" \
-p "src/crc32c/" \
-p "src/bench/" \
-p "src/univalue" \
-p "src/crypto/ctaes" \
-p "src/minisketch" \
-p "src/secp256k1" \
Expand Down
1 change: 0 additions & 1 deletion ci/lint/06_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export COMMIT_RANGE
test/lint/git-subtree-check.sh src/crypto/ctaes
test/lint/git-subtree-check.sh src/secp256k1
test/lint/git-subtree-check.sh src/minisketch
test/lint/git-subtree-check.sh src/univalue
test/lint/git-subtree-check.sh src/leveldb
test/lint/git-subtree-check.sh src/crc32c
test/lint/check-doc.py
Expand Down
1 change: 0 additions & 1 deletion contrib/devtools/copyright_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"src/leveldb/",
"src/minisketch",
"src/secp256k1/",
"src/univalue/",
"src/crc32c/",
]

Expand Down
4 changes: 0 additions & 4 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1158,10 +1158,6 @@ Current subtrees include:
- src/crypto/ctaes
- Upstream at https://github.com/bitcoin-core/ctaes ; maintained by Core contributors.

- src/univalue
- Subtree at https://github.com/bitcoin-core/univalue-subtree ; maintained by Core contributors.
- Deviates from upstream https://github.com/jgarzik/univalue.

- src/minisketch
- Upstream at https://github.com/sipa/minisketch ; maintained by Core contributors.

Expand Down
44 changes: 0 additions & 44 deletions src/univalue/.cirrus.yml

This file was deleted.

19 changes: 0 additions & 19 deletions src/univalue/COPYING

This file was deleted.

58 changes: 0 additions & 58 deletions src/univalue/Makefile.am

This file was deleted.

21 changes: 0 additions & 21 deletions src/univalue/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions src/univalue/autogen.sh

This file was deleted.

1 change: 0 additions & 1 deletion src/univalue/build-aux/m4/.gitignore

This file was deleted.

Loading

0 comments on commit 8035b5c

Please sign in to comment.