Thread

Didn't expect this today: The bitcoin kernel API is now in Bitcoin Core's master branch! A decade of effort for various contributors and three years from myself: Looking forward to an ecosystem of implementations, full nodes, and tools being developed around it!

Replies (35)

amazing work. we're gonna build so many nodes!!!
sedited's avatar sedited
Didn't expect this today: The bitcoin kernel API is now in Bitcoin Core's master branch! A decade of effort for various contributors and three years from myself: Looking forward to an ecosystem of implementations, full nodes, and tools being developed around it!
View quoted note →
Very cool. Looking at the chainstate stuff, do you think it'll make it easier for me to do this task: a db query on the current utxo set to grab (scriptpubkey, amount) pairs that fit a certain filter on amount. I would have guessed not, but some of the existing uses you described were similar.
The warning that @npub185h9...wrdp wrote on some of the bitcoinj consensus code is one of the most frightening warning comments I have ever seen! There is nothing remotely comparable to libbitcoinkernel to replace. I knew that 10 years ago when I was messing around with this:
To run the Schnorr Signature example with JVM: nix run github:msgilligan/secp256k1-jdk-flake#secp256k1-jdk To run it the natively-compiled version: nix run github:msgilligan/secp256k1-jdk-flake#secp256k1-jdk-native If you want to play with source, do: nix shell nixpkgs#jbang enter the below code into a file named SecpEcdsa.java and then `jbang SecpEcdsa.java`. (Schnorr sig is little trickier to run in JBang because you need libsecp256k installed, but the flakes above handle it.) β€”β€” ///usr/bin/env jbang "$0" "$@" ; exit $? //JAVA 17+ //REPOS mavencentral, secpjdk=https://gitlab.com/api/v4/projects/55956336/packages/maven //DEPS org.bitcoinj.secp:secp-bouncy:0.2 import org.bitcoinj.secp.*; byte[] message = sha256("Hello World!"); void main() { IO.println("secp256k1-jdk ECDSA Sample"); try (Secp256k1 secp = Secp256k1.getById("bouncy-castle")) { var pair = secp.ecKeyPairCreate(); var sig = secp.ecdsaSign(message, pair).get(); var isValid = secp.ecdsaVerify(sig, message, pair.publicKey()).get(); IO.println("Valid ECDSA signature = " + isValid); } } byte[] sha256(String message) { try { return MessageDigest.getInstance("SHA-256").digest(message.getBytes()); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); // Can't happen. } } β€”β€”