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

[kernel 0/n] Introduce bitcoin-chainstate #24304

Merged

Conversation

dongcarl
Copy link
Contributor

@dongcarl dongcarl commented Feb 9, 2022

Part of: #24303

This PR introduces an example/demo bitcoin-chainstate executable using said library which can print out information about a datadir and take in new blocks on stdin.

Please read the commit messages for more details.


You may ask: WTF?! Why is index/*.cpp, etc. being linked in?

This PR is meant only to capture the state of dependencies in our consensus engine as of right now. There are many things to decouple from consensus, which will be done in subsequent PRs. Listing the files out right now in bitcoin_chainstate_SOURCES is purely to give us a clear picture of the task at hand, it is not to say that these dependencies belongs there in any way.

TODO

  1. Clean up bitcoin-chainstate.cpp
    It is quite ugly, with a lot of comments I've left for myself, I should clean it up to the best of my abilities (the ugliness of our init/shutdown might be the upper bound on cleanliness here...)

@dongcarl dongcarl marked this pull request as draft February 9, 2022 21:01
@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch 2 times, most recently from c7bcdbe to 518c876 Compare February 9, 2022 21:34
Copy link
Member

@maflcko maflcko 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. Left some questions.

src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved
[](){ return false; });
if (rv.has_value()) {
std::cerr << "Failed to load Chain state from your datadir." << std::endl;
goto epilogue;
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't the code be easier to read by replacing this with return; and letting a destructor of an object that lives in this scope take care of the cleanup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, with our codebase right now if we don't do the shutdown process in a very carefully sequenced way, there will be nullptr dereferences and other undefined behaviour.

Copy link
Member

Choose a reason for hiding this comment

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

I don't mean to reorder the sequence. It is just a suggestion to remove goto, which in my eyes is impossible to review. I am convinced that any code using goto can be rewritten in a way that doesn't use goto and is at the same time easier to read. I can look into this in the future, unless someone beats me to it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mean to reorder the sequence. It is just a suggestion to remove goto, which in my eyes is impossible to review.

IMO, it is ok to use goto in a limited way to exit a block, and not worse than break. This can be cleaner and better than more convoluted alternatives and there are good practices build around it https://www.kernel.org/doc/html/latest/process/coding-style.html#centralized-exiting-of-functions

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should be using the style guide of the kernel (a project written in C) for a project written in C++.

But given that the code here isn't used for anything after compilation (other than to prove that linking works), I think any style is fine here.

Copy link
Member

@laanwj laanwj Feb 14, 2022

Choose a reason for hiding this comment

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

IMO goto is acceptable in C, which has no RAII and other scope-based ways of handling errors, but not in C++, generally. The only current use of goto we have in the code is in src/crypto/poly1305.cpp which is effectively included C code. So i'd really like to avoid it if remotely possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

In commit "build: Add example bitcoin-chainstate executable" (ac43dd0)

I guess the goto is kind of a shiny object. You can get rid of gotos by improving code (refactoring out functions, using RAII) but you can also get rid of gotos by making code worse (adding layers of nesting and loops and confusing variables). Exciting to see what is in this little goto's future!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree that this goto is a shiny object 😅 . It's actually the reason why I added the developer note at the beginning of the file here:

// DEVELOPER NOTE: Since this is a "demo-only", experimental, etc. executable,
// it may diverge from Bitcoin Core's coding style.

I think that since this binary is a "demo-only" executable (that will actually later be moved to src/kernel/examples/bitcoin-chainstate) we can not bother too much with its style. However, I do agree that this wouldn't be acceptable if it were not "demo-only".

If people feel very strongly about it, please speak up and I can make the necessary modifications, but it might make things a bit less readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Here's a simple way of avoiding goto without (I think) making things less readable: ajtowns@5d7d8de

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ajtowns Hmmm good point... Well since I'm going to introduce a kernel::Context object anyway, might be good to just move the init/shutdown logic over there and let RAII handle it. Will play around with it, thanks for the hint!!

src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved
@maflcko
Copy link
Member

maflcko commented Feb 10, 2022

Would it be appropriate to add a CI job that enables --enable-experimental-util-chainstate?

Do you need to add one? What about adding it to the existing nowallet task?

@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch from 518c876 to 1d9faa8 Compare February 10, 2022 20:32
@dongcarl
Copy link
Contributor Author

@dongcarl
Copy link
Contributor Author

@MarcoFalke

Do you need to add one? What about adding it to the existing nowallet task?

I'm happy to add it to the existing nowallet task if you think it's appropriate! Lmk!

@maflcko
Copy link
Member

maflcko commented Feb 10, 2022

I'm happy to add it to the existing nowallet task if you think it's appropriate! Lmk!

Yeah, I don't think there are any downsides and only upsides to it, right?

@dongcarl dongcarl mentioned this pull request Feb 10, 2022
14 tasks
@maflcko
Copy link
Member

maflcko commented Feb 10, 2022

From ci:

clientversion.cpp:19:10: fatal error: 'obj/build.h' file not found
#include <obj/build.h>
         ^~~~~~~~~~~~~
1 error generated.

@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch 5 times, most recently from 7c40e96 to d8f2e52 Compare February 11, 2022 01:58
.cirrus.yml Show resolved Hide resolved
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 11, 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:

  • #24322 ([kernel 1/n] Introduce initial libbitcoinkernel by dongcarl)
  • #24164 (build: Bump minimum required clang/libc++ to 8.0 by MarcoFalke)

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.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK e5579f1 with caveat that I mostly focused on the first commit and did not very closely review the build changes. (I think it could be a good idea to put first commit and other commits into two separate PRs, because the reviewers who are best able to give feedback about the code in the first commit are not necessarily the same people who can provide best feedback about the build commits.)

src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved

ChainstateManager chainman;

auto rv = LoadChainstate(false,
Copy link
Contributor

Choose a reason for hiding this comment

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

In commit "build: Add example bitcoin-chainstate executable" (01840e6)

The LoadChainstate and VerifyLoadedChainstate calls here would be cleaner with b7c7f64 suggested in #23280 (review) and would let this code print specific error messages instead failing generically and discarding the return codes.

[](){ return false; });
if (rv.has_value()) {
std::cerr << "Failed to load Chain state from your datadir." << std::endl;
goto epilogue;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mean to reorder the sequence. It is just a suggestion to remove goto, which in my eyes is impossible to review.

IMO, it is ok to use goto in a limited way to exit a block, and not worse than break. This can be cleaner and better than more convoluted alternatives and there are good practices build around it https://www.kernel.org/doc/html/latest/process/coding-style.html#centralized-exiting-of-functions

src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved
src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved
src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved
@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch 3 times, most recently from 91bf084 to c5d2125 Compare February 11, 2022 18:36
@dongcarl dongcarl changed the title [kernel 0/n] Introduce bitcoin-chainstate and libbitcoinkernel [kernel 0/n] Introduce bitcoin-chainstate Feb 11, 2022
@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch 2 times, most recently from da5937d to 5fb9086 Compare February 11, 2022 19:34
@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch 2 times, most recently from 93f0dec to 0ad6a3e Compare February 13, 2022 19:39
@dongcarl
Copy link
Contributor Author

Pushed 0ad6a3e:

  • Lots of cleanup in bitcoin-chainstate.cpp:
    • Added copyright header
    • More information in header comment
    • Removed personal comments
    • Added comments separating the stages of setup
    • Sorted headers
    • Moved submitblock_StateCatcher to where it's used so there's more context
    • Addressed some review comments

@maflcko maflcko added this to the 24.0 milestone Feb 14, 2022
@maflcko
Copy link
Member

maflcko commented Feb 14, 2022

Assigned 24.0, as this missed the 0.23 feature freeze

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

re-ACK 0ad6a3e 🔟

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK 0ad6a3e81265ef2ad5353c4e0f6553955980d2bc 🔟
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjLOgwAjdvJIwihxHSRaKHl0iVEsfH9gOsvngLNiBtqBBlXbooA0NFaFXMKce5f
v17lIZqfNLCfyIEZFSrgb4cTRAMURDJNTyVg4pFBCEVcmSxmcGniff8v9Y+pbPj7
Z7WYljWzVJpZeuAQyFwiAr9AerIYUZVndLX5X+QKf+JMBqg1Vv7G7SIfgdlUAzl8
+hIPW144xzl6xZRsTJrBp91GdAAY/vyAz+8EfFay82SAJC6ZE9CGtUEzrYyOQ8S/
vD+5ach5xi2FbOQgXYX+49Hqgx+x0VzAhEI4XeUm0NDKaiRlK15oPegyPXjL+obT
wmE+N1AzpeYJ60Wih64XyT7NB3DaMpExoybmMlgPaOyfLZvC+nMlhjffPG5M3sni
Xl1ffLN873bQgYJf8mT/vO/U+PHTD6iJBk9LzhMYTF5ltW94j7/2XCCB3/3nRCFn
2R0jz8wJxovw2a/MDkI3mdfvzzWQeIugGNZie2fs+Vtn5cgyWfdburKq4d2bUEum
MuiehY0A
=PeLI
-----END PGP SIGNATURE-----

src/Makefile.am Outdated Show resolved Hide resolved
// now.
//
// DEVELOPER NOTE: Since this is a "demo-only", experimental, etc. executable,
// it may diverge from Bitcoin Core's coding style.
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be removed and if there was any reason to use a different coding style for this binary, it can be explained in the pull request, a review comment, or a code comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some discussion here: #24304 (comment)

src/bitcoin-chainstate.cpp Outdated Show resolved Hide resolved
@DrahtBot
Copy link
Contributor

Guix builds

File commit 3bb9394
(master)
commit 9a7960d
(master and this pull)
SHA256SUMS.part dd60a2a6ddc05117... c66e790fb18446a3...
*-aarch64-linux-gnu-debug.tar.gz 8bc5bcfefab76715... 3bb32eacda2bb05c...
*-aarch64-linux-gnu.tar.gz 710321dcf5f0a4e9... 0c1e5fe5616aa830...
*-arm-linux-gnueabihf-debug.tar.gz d0b5b74e80a06c13... 2ecf253ec6fa0271...
*-arm-linux-gnueabihf.tar.gz 7540ec432bbe611b... 47199eb27f02243c...
*-arm64-apple-darwin.tar.gz 20bd3de56c122dab... 814782a35b36f1ab...
*-osx-unsigned.dmg 238a67aa27f7ed54... a9458756f40d3ddc...
*-osx-unsigned.tar.gz ab189b2d1873f62f... b95e1130224420d3...
*-osx64.tar.gz c25bd3526668fd5b... 3f19b8883178fa1e...
*-powerpc64-linux-gnu-debug.tar.gz d8f9c7a39538f196... 02db19de98581b1e...
*-powerpc64-linux-gnu.tar.gz 751c0e3f4371b425... a7a169f4c644fabf...
*-powerpc64le-linux-gnu-debug.tar.gz 0b3a07e161da8e65... bd69f38a7f2666fc...
*-powerpc64le-linux-gnu.tar.gz df8899cbe9059ccd... 43a74a88dc35429c...
*-riscv64-linux-gnu-debug.tar.gz 0cb9b3fe2626bac2... add199d090229d79...
*-riscv64-linux-gnu.tar.gz 08296f18f18113e9... ad4aa3496b4e2659...
*-x86_64-linux-gnu-debug.tar.gz 41ecc738e3c92499... 92972e36cb96a7cc...
*-x86_64-linux-gnu.tar.gz 9e1179bfc7d06e08... 456f9cc530993ded...
*.tar.gz b7698539ff204a66... 7c8b49704e80e812...
guix_build.log a288ed44440d4dfb... 546ce6009e648f76...
guix_build.log.diff 81641e662291152b...

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK 0ad6a3e with same caveat that mostly focused on first commit, paid less attention to build changes in second commit. Only changes since last review were documentation changes which all looked very good to me.

Some comments about dependencies were lost, but it is probably better not to have the level of detail they were going into here:

-    // Initialize signatureCache cuz it's used by...
-    //     <- VerifyECDSASignature
-    //     <- CheckECDSASignature
-    //     <- EvalChecksigPreTapscript
-    //     <- EvalScript
-    //     <- VerifyScript
-    //     <- CScriptCheck::()
-    //     <- CheckInputScripts
-    //     <- ConnectBlock
-    //     <- ConnectTip
-    //     <- ActivateBestChainStep
-    //     <- ActivateBestChain
-    //     <- ProcessNewBlock
     InitSignatureCache();
-
-    // Initialize g_scriptExecutionCache{,Hasher} cuz it's used by...
-    //     <- CheckInputScripts
-    //     <- ConnectBlock
-    //     <- ConnectTip
-    //     <- ActivateBestChainStep
-    //     <- ActivateBestChain
-    //     <- ProcessNewBlock
     InitScriptExecutionCache();

src/bitcoin-chainstate.cpp Show resolved Hide resolved
[](){ return false; });
if (rv.has_value()) {
std::cerr << "Failed to load Chain state from your datadir." << std::endl;
goto epilogue;
Copy link
Contributor

Choose a reason for hiding this comment

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

In commit "build: Add example bitcoin-chainstate executable" (ac43dd0)

I guess the goto is kind of a shiny object. You can get rid of gotos by improving code (refactoring out functions, using RAII) but you can also get rid of gotos by making code worse (adding layers of nesting and loops and confusing variables). Exciting to see what is in this little goto's future!

The bitcoin-chainstate executable serves to surface the dependencies
required by a program wishing to use Bitcoin Core's consensus engine as
it is right now.

More broadly, the _SOURCES list serves as a guiding "North Star" for the
libbitcoinkernel project: as we decouple more and more modules of the
codebase from our consensus engine, this _SOURCES list will grow shorter
and shorter. One day, only what is critical to our consensus engine will
remain. Right now, it's "the minimal list of files to link in to even
use our consensus engine".

[META] In a future commit the libbitcoinkernel library will be extracted
       from bitcoin-chainstate, and the libbitcoinkernel library's
       _SOURCES list will be the list that we aim to shrink.
...to make sure that the linker errors that arise from coupling
regressions are caught by CI.

Adding to the "no wallet" ci job as suggested by MarcoFalke.
@dongcarl dongcarl force-pushed the 2022-02-libbitcoinkernel-p0-minimal branch from 0ad6a3e to 2c03cec Compare February 14, 2022 19:54
@dongcarl
Copy link
Contributor Author

Pushed 2c03cec

  • Rebased over master to account for header-only boost change
  • Some comment and formatting changes to bitcoin-chainstate.cpp

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK 2c03cec. Just rebase, comments, formatting change since last review

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

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

Did some light testing of 2c03cec. Very cool! I fed it block 1 and 2 on a fresh datadir and it was happy. I fed it a duplicate block and it exited. I fed it block 4 and it complained it didn't have the previous block. All fine for now I would say.

Can you add a short documentation, e.g. contrib/KERNEL.md, that includes a link to #24303, the configure flag and one example incantation how to use this binary? It doesn't have to explain the entire kernel project.

It might also be good to add a basic functional test for the binary. test/functional/tool_wallet.py should be a good template. You may need to add something to good_prefixes_re depending on how you name the test file.

A skeleton manpage might be nice too, see plumbing example in #20913.

@@ -626,6 +627,12 @@ AC_ARG_ENABLE([util-util],
[build_bitcoin_util=$enableval],
[build_bitcoin_util=$build_bitcoin_utils])

AC_ARG_ENABLE([experimental-util-chainstate],
[AS_HELP_STRING([--enable-experimental-util-chainstate],
Copy link
Member

Choose a reason for hiding this comment

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

You may want to document this in the PR description and elsewhere.

Also should be in the ./configure summary.

Copy link
Contributor

Choose a reason for hiding this comment

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

re: #24304 (comment)

You may want to document this in the PR description and elsewhere.

Also should be in the ./configure summary.

I believe this is only temporarily built as part of our build system and later moves to an examples folder (and built with cmake!) So that may a reason not to add it to --configure help, though I guess it you could have a comment saying the option is temporary and will be removed later. Agree it makes sense to document in PR description and elsewhere (maybe at the top of bitcoin-chainstate.cpp) so it's obvious how to build & test this

Copy link
Member

Choose a reason for hiding this comment

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

So that may a reason not to add it to --configure help,

This option is already included in ./configure --help output, that's done automatically by autotools.

Also should be in the ./configure summary.

I don't think it needs to be.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Can you add a short documentation, e.g. contrib/KERNEL.md, that includes a link to #24303, the configure flag and one example incantation how to use this binary? It doesn't have to explain the entire kernel project.

You already know this since you commented there, but for anyone else I started writing up some things about libbitcoinkernel design in #24352 (with a lot of "probably" hedging which I'll remove because it was before I talked to Carl and was guessing about some things).

I think existing https://github.com/bitcoin/bitcoin/blob/master/doc/shared-libraries.md will be a good place to document libbitcoinkernel usage when it gets added by the next PR.

It might also be good to add a basic functional test for the binary. test/functional/tool_wallet.py should be a good template. You may need to add something to good_prefixes_re depending on how you name the test file.

A skeleton manpage might be nice too, see plumbing example in #20913.

I think this is only temporarily built as part of our build system, and later moving to an examples folder with a CMake file, so that would be a reason not to do the test, manpage, etc in this style.

@@ -626,6 +627,12 @@ AC_ARG_ENABLE([util-util],
[build_bitcoin_util=$enableval],
[build_bitcoin_util=$build_bitcoin_utils])

AC_ARG_ENABLE([experimental-util-chainstate],
[AS_HELP_STRING([--enable-experimental-util-chainstate],
Copy link
Contributor

Choose a reason for hiding this comment

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

re: #24304 (comment)

You may want to document this in the PR description and elsewhere.

Also should be in the ./configure summary.

I believe this is only temporarily built as part of our build system and later moves to an examples folder (and built with cmake!) So that may a reason not to add it to --configure help, though I guess it you could have a comment saying the option is temporary and will be removed later. Agree it makes sense to document in PR description and elsewhere (maybe at the top of bitcoin-chainstate.cpp) so it's obvious how to build & test this

@fanquake
Copy link
Member

I think this is only temporarily built as part of our build system, and later moving to an examples folder with a CMake file, so that would be a reason not to do the test, manpage, etc in this style.

I agree with Russ. I don't really see a reason to add tests, let alone a manpage for this binary.

@Sjors
Copy link
Member

Sjors commented Feb 17, 2022

later moving to an examples folder with a CMake file

Having untested examples could lead to code rot though.

I could also imagine this bitcoin-chainstate binary actually being useful, especially when you add ZMQ support. In a micro-service like architecture you would feed it blocks from another source (like an edge node) and it would spit out ZMQ feeds. All this without the menace of p2p connections and without the need for using RPC communication. But maybe this is a bit too contrived.

(ZMQ of course doesn't belong in a kernel, but some sort of notification interface probably does, and this binary can demo that)

@ryanofsky
Copy link
Contributor

Having untested examples could lead to code rot though.

Agreed. I definitely think this should be continue to be built by CI at the very least, and maybe a have a little script feeding it a test block.

I could also imagine this bitcoin-chainstate binary actually being useful, especially when you add ZMQ support.

This could be great, but I believe it should be a separate tool cloned / inspired from this one. When you are using a new library it's helpful to have a simple minimal example along with the fancy demo example.

@ryanofsky
Copy link
Contributor

(ZMQ of course doesn't belong in a kernel, but some sort of notification interface probably does, and this binary can demo that)

Stdout is my favorite notification interface 😏

@maflcko
Copy link
Member

maflcko commented Feb 17, 2022

Not sure if this needs a manpage and test, since there is already a test for it (see second commit). The goal of the binary right now is to confirm that the compiler and linker doesn't fail. I don't think that the binary should be considered stable for end users. Also, the interface is mostly a playground, as I understand it, and not the interface that will be shipped when it is final and ready for end users. Thus, adding a test will make it harder to change the interface later on.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

re-ACK 2c03cec 🏔

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK 2c03cec2ff8cdbfd5da92bfb507d218e5c6435b0 🏔
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjqVQv9GTYBZ644zKBR/8+NgZAZqR/vzNuVLzgPo9UWDexF6M1LZRVpQaoaz831
PxJui5vAF4Eegt6OPhOEzmW4jpd6s5MpURCBL8BzKiyRxe0uT0MPnzufwpZn3iBP
SVpmoAcgG0ZjM9cdY2iJsLqhf47AHqAqh2K8f9gCoObqloHgjIb5fiK5gXowWLDd
B/zlZgmIaxlS/rgyUkpLa/5kIEOONyO56abJ9PhAlXYKm1GIX5+/GgB0Yb/BJEwL
bP843qBy511C07usDLKp3pPMPAFakDFJPJlmE7evSE5DEKcoXVTQGTjoK1JQ/j4t
Pa2bESI48/V7dBOGYDsEd0AdoW3J2Mkhkbzk1lp6Fu+vCQQbEqIVw5F05p3hUmuJ
RyDJROFVjvONophU2MMLOkL7xlfmNQzXY56ONDsd3OhPWG7bX82Kf0XPZ5rDqDGn
9FWDiAf5/mTscazQ0wcwLZlIHX9gx0v0XOZNcLiStfaeAPq4X3U2cEN+2oPHHQtg
8CMkgV6s
=nVUh
-----END PGP SIGNATURE-----

@ajtowns
Copy link
Contributor

ajtowns commented Feb 17, 2022

ACK 2c03cec

@maflcko maflcko merged commit 619f8a2 into bitcoin:master Mar 3, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 5, 2022
@ariard
Copy link
Contributor

ariard commented Mar 5, 2022

Post-merge ACK 2c03cec

fanquake added a commit that referenced this pull request Apr 28, 2022
035fa1f build: Remove LIBTOOL_APP_LDFLAGS for bitcoin-chainstate (Cory Fields)
3f05950 docs: Add libbitcoinkernel_la_SOURCES explanation (Carl Dong)
94ad45d ci: Build libbitcoinkernel (Carl Dong)
26b2e7f build: Extract the libbitcoinkernel library (Carl Dong)
1df44dd b-cs: Define G_TRANSLATION_FUN in bitcoinkernel.cpp (Carl Dong)
83a0bb7 build: Separate lib_LTLIBRARIES initialization (Carl Dong)
c1e16cb build: Create .la library for bitcoincrypto (Carl Dong)
8bdfe05 build: Create .la library for leveldb (Carl Dong)
05d1525 build: Create .la library for crc32c (Carl Dong)
64caf94 build: Remove vestigial LIBLEVELDB_SSE42 (Carl Dong)
1392e8e build: Don't add unrelated libs to LIBTEST_* (Carl Dong)

Pull request description:

  Part of: #24303

  This PR introduces a `libbitcoinkernel` static library linking in the minimal list of files necessary to use our consensus engine as-is. `bitcoin-chainstate` introduced in #24304 now will link against `libbitcoinkernel`.

  Most of the changes are related to the build system.

  Please read the commit messages for more details.

ACKs for top commit:
  theuni:
    This may be my favorite PR ever. It's a privilege to ACK 035fa1f.

Tree-SHA512: b755edc3471c7c1098847e9b16ab182a6abb7582563d9da516de376a770ac7543c6fdb24238ddd4d3d2d458f905a0c0614b8667aab182aa7e6b80c1cca7090bc
@bitcoin bitcoin locked and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done or Closed or Rethinking
Development

Successfully merging this pull request may close these issues.

9 participants