bitcoin_devs
Bitcoin Dev Project
The go-to resource for developers to learn bitcoin and related technologies. Get inspired to kickstart and grow your career in bitcoin open source software (โฟOSS).
Public Key
npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 Profile Code
nprofile1qqs8sccnw8c4ns0xjen9mgdgks25d46k2kcssk60uxs635zmngxh5nspz3mhxue69uhhyetvv9ujuerpd46hxtnfduqs6amnwvaz7tmwdaejumr0dskun7sl
Show more details
Published at
2025-02-23T19:46:27Z Event JSON
{
"id": "3d346228999e28f07b4e11c129ce69feff703cd935e7485636882d9e929c91df" ,
"pubkey": "78631371f159c1e696665da1a8b41546d75655b1085b4fe1a1a8d05b9a0d7a4e" ,
"created_at": 1740339987 ,
"kind": 0 ,
"tags": [],
"content": "{\"nip05\":\"[email protected] \",\"name\":\"bitcoin_devs\",\"about\":\"The go-to resource for developers to learn bitcoin and related technologies. Get inspired to kickstart and grow your career in bitcoin open source software (โฟOSS).\",\"picture\":\"https://image.nostr.build/83e8546219fb8cfba2c681f4fe01e0e5a75c8cd487439117330d00871ba2e3cd.jpg\",\"website\":\"https://bitcoindevs.xyz\",\"lud16\":\"[email protected] \",\"pubkey\":\"78631371f159c1e696665da1a8b41546d75655b1085b4fe1a1a8d05b9a0d7a4e\",\"npub\":\"npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2\",\"created_at\":1740165343,\"displayName\":\"Bitcoin Dev Project\",\"display_name\":\"Bitcoin Dev Project\",\"banner\":\"https://m.primal.net/NWfw.jpg\"}" ,
"sig": "73544ba6882b3d15dd31551f3f3d914e5bdcf6ed580efd2fb5ba851228f75c3f9199b16b50d952f73e5682bc4e793c86cba917a36a2590c18d1c0eb48e46039c"
}
Last Notes npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs ๐งฐ Too much bitcoin tech knowledge is trapped in videos and podcasts If only there was an easy way to unearth those insights and gemsโฆ ๐ค We wondered that too, so we redesigned Bitcoin Transcripts! ๐ https://technicaldifficulties.io/nostr/bdp/transcriptsv2/transcriptsv2_homepage.png ๐ Bitcoin Transcripts is a filterable library of transcripts from: โข dev meetups โข conferences โข podcasts โข panels Skim talks, quote insights, and search by keyword. All in one place. ๐ https://btctranscripts.com โ๏ธ Missed a workshop or podcast episode? No worries. You can now quickly search by keyword or topic and read the conversation in minutes instead of watching hours of video, Accelerating your speed to insights. ๐งโ๐ซ Bitcoin Transcripts is perfect for: - bitcoin devs digging into prior research - educators creating content - researchers analyzing protocol history or - enthusiasts who prefer reading over listening Taproot workshops, Lightning panels, itโs all in there. Open-source and built by the community ๐งก This project stands on the shoulders of contributors like Bryan Bishop (https://heybryan.org/) who manually transcribed hundreds of talks. Now, with modern tools, we can scale that effort for the whole community. https://technicaldifficulties.io/nostr/bdp/transcriptsv2/transcriptsv2_bryantyping.png Many thanks to our contributors: - Dev: @nprofileโฆ7k9s , Jamal (https://github.com/jrakibi), Emmanuel (https://github.com/Emmanuel-Develops), @nprofileโฆgh4s - Data & architecture: Andreas (https://www.kouloumos.com/), Urvish (https://github.com/urvishp80) - Vision: @nprofileโฆz4ak - Design: Tobi (https://x.com/Adeoye_G), Khush (https://x.com/ikhushh7), @nprofileโฆqdk5 - Product: @nprofileโฆez5h - Inspiration: Bryan Bishop (https://heybryan.org/) Whatโs next? Weโll keep adding transcripts from upcoming events and backfill any important historic talks we missed. ๐ Would love your help editing transcripts as well. Dive in, explore, and let us know what you think! ๐ btctranscripts.com npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Yes! The more BOSS devs the merrier! https://blossom.primal.net/623c7e12aeda2c8c88f323af610a458e000df9ba6c0550201366b6a32f037a92.gif npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs This is great! We love to see it!! ๐ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Slots are filling up fast for our Warnet track at Friday's #MITBitcoinExpo Hackathon! We stand up a network of Bitcoin Core nodes. You use Bitcoin Core's functional test framework to write attacks in Python and take them down. This event is open to hackers around the globe. Participants can be in-person or remote. And did we mention the $3,000 prize from the MIT Bitcoin Club? ๐ Head over to https://mitbitcoin.devpost.com to sign up today! https://technicaldifficulties.io/nostr/bdp/WarnetShirtImage.png We'll also have weโll have additional prizes for Warnet track winners that are able to join in person. These gorgeous coasters by A+ Engrave are just one example! ๐คฉ https://technicaldifficulties.io/nostr/bdp/mit2025/slatecoaster.jpeg https://technicaldifficulties.io/nostr/bdp/mit2025/corkcoasters.jpeg https://technicaldifficulties.io/nostr/bdp/mit2025/warnetmug.jpeg npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs ๐๐ก๐ ๐๐ข๐ญ๐๐จ๐ข๐ง ๐๐๐ฏ ๐๐ซ๐จ๐ฃ๐๐๐ญ ๐ก๐๐ฌ ๐ ๐ญ๐ซ๐๐๐ค ๐๐ญ ๐ญ๐ก๐ ๐๐๐ ๐๐ข๐ญ๐๐จ๐ข๐ง ๐๐ฑ๐ฉ๐จ ๐๐๐๐ค๐๐ญ๐ก๐จ๐ง, ๐๐ง๐ ๐ข๐ญ ๐ก๐๐ฌ ๐ $๐,๐๐๐ ๐ฉ๐ซ๐ข๐ณ๐! Participants have 30 hours, starting April 4 and are welcome to hack from around the globe. ๐ We repeat, you do not have to attend in person ๐ ๐๐จ๐ฌ๐ญ ๐ก๐๐๐ค๐๐ญ๐ก๐จ๐ง ๐ญ๐ซ๐๐๐ค๐ฌ ๐๐ซ๐ ๐๐๐จ๐ฎ๐ญ ๐๐ฎ๐ข๐ฅ๐๐ข๐ง๐ , ๐๐ฎ๐ญ ๐ง๐จ๐ญ ๐ญ๐ก๐ข๐ฌ ๐จ๐ง๐. ๐๐ก๐ข๐ฌ ๐ข๐ฌ ๐๐๐จ๐ฎ๐ญ ๐๐ซ๐๐๐ค๐ข๐ง๐ ๐จ For the Bitcoin Dev Project track, the goal is to take down the bitcoin network. We stand up a network of bitcoin core nodes. You and your team take down as many as possible. Whichever team brings down the most in the shortest amount of time wins. Monitor extreme and yet unknown network behaviors, discover vulnerabilities, and build a stronger, more resilient bitcoin. https://m.primal.net/PSUQ.png This track is for hackers with some level of coding skill, & the ability to use the command line interface (CLI). Familiarity with Bitcoin Core, esp. the JSON-RPC interface is useful. A general understanding of how blockchains and distributed networks work will come in handy. Who's ready to win? Sign up below! ๐ https://mitbitcoin.devpost.com/ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs This tool was initially made for the @nprofileโฆ3hr7 website. You can find it here: https://bitcoinops.org/en/tools/reorg-calculator/ https://m.primal.net/PIbN.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs New tool in Decoding Bitcoin! REORG CALCULATOR โ๏ธ Computes the probability that an attacker could reorganize z blocks with a given % of the total network hashrate Hereโs the probability of an attacker reorganizing 6 blocks with 30% of the total hashrate https://bitcoindevs.xyz/decoding/reorg-calculator https://m.primal.net/PIbM.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Buckle up for today's #DecodingBitcoin post. It's a long one but we promise it's worth your time. Today we're going to break down how to sign a #bitcoin segwit transaction using a real example from the BIP-143 test vectors (thatโs one of the segwit BIPs!) https://technicaldifficulties.io/nostr/bdp/segwittxsigning/titleimage.png ๐๐๐ก๐: ๐กโ๐๐ ๐๐ฅ๐๐๐๐๐ ๐๐ ๐๐๐ ๐ ๐ ๐๐๐ค๐๐ก ๐ฃ0 ๐ก๐๐๐๐ ๐๐๐ก๐๐๐ ๐ ๐ ๐ ๐๐๐ ๐๐ ๐กโ๐ ๐ ๐๐๐๐๐๐๐๐ ๐๐๐ ๐๐๐๐๐๐๐๐๐ก ๐๐๐ ๐๐๐๐๐๐ฆ ๐๐๐ ๐ก๐๐๐๐๐๐ก (๐ ๐๐๐ค๐๐ก ๐ฃ1) ๐ก๐๐๐๐ ๐๐๐ก๐๐๐๐ . ๐ป๐๐ค๐๐ฃ๐๐, ๐กโ๐ ๐๐๐๐๐๐๐ ๐๐๐๐๐๐๐ก๐ ๐๐๐ ๐ ๐ก๐๐๐ ๐กโ๐ ๐ ๐๐๐! The transaction we'll be working with has two inputs. The first is a legacy P2PK inputโwe wonโt be covering that today. Instead, weโre going to focus on the second input, the P2WPKH (native segwit) one. https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning1.png Since this example came from one of the BIP-143 test vectors, we know what the final, signed transaction looks like. The goal is to recreate this: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning2.png First, we create the base transaction, the transaction without any signatures. Weโll start with the - version number - marker & flag fields (to indicate the tx is segwit) - locktime https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning3.png ๐ด ๐๐๐ก๐ ๐๐ ๐ ๐๐๐ค๐๐ก ๐ฃ๐ . ๐๐๐๐๐๐ฆ ๐ก๐๐๐๐ ๐๐๐ก๐๐๐๐ : ๐ต๐๐๐๐ข๐ ๐ ๐๐ก ๐๐๐๐ ๐ก ๐๐๐ ๐๐ ๐กโ๐ ๐๐๐๐ข๐ก๐ ๐๐ ๐ ๐๐๐ค๐๐ก (๐๐๐ก๐๐ฃ๐ ๐๐ ๐ค๐๐๐๐๐๐), ๐กโ๐ ๐ก๐๐๐๐ ๐๐๐ก๐๐๐ ๐๐ ๐๐๐ ๐ ๐๐๐๐ ๐๐๐๐๐๐ ๐ ๐๐๐ค๐๐ก. https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning4.png Hereโs what we have so far: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning5.png Letโs add inputs! Recall that all inputs come from existing transactions. That means for each input, we need to find the transaction it came from and get: 1. that transactionโs ID 2. the output index ๐๐ก๐๐ญโ๐ฌ ๐๐ง ๐จ๐ฎ๐ญ๐ฉ๐ฎ๐ญ ๐ข๐ง๐๐๐ฑ? Every transaction has a list of outputs. The โoutput indexโ is a way to reference a specific output from the list. We need to ask, "from a transactionโs list of outputs, which one corresponds to the input I care about?โ For each input, two more things are needed: the ๐ฌ๐๐ซ๐ข๐ฉ๐ญ๐๐ข๐ (placeholder for data required to spend the input), and a ๐ฌ๐๐ช๐ฎ๐๐ง๐๐ ๐ง๐ฎ๐ฆ๐๐๐ซ (usually 0xFFFFFFFF) https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning6.png After adding all the inputs, the transaction looks like this: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning7.png Remember when we said the scriptSig would be a placeholder? Hereโs why those fields are currently empty: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning8.png Time to add outputs! For each output, we include the - amount (in satoshis) - scriptPubKey: the locking script that defines the rules for how the output can be spent https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning9.png Things are starting to come together! https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning10.png A few more things are needed before we can get to signing. First is setting up the ๐ฐ๐ข๐ญ๐ง๐๐ฌ๐ฌ field. This is where the signature and corresponding public key go for segwit transactions. The witness field starts off empty. This is different from legacy transactions where signatures are placed directly in the scriptSig field. https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning11.png The next thing thatโs needed is the ๐ฌ๐๐ซ๐ข๐ฉ๐ญ๐๐จ๐๐. The scriptCode for a P2WPKH (pay-to-witness-public-key-hash) input is: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning12.png ๐โ๐๐กโ๐ ๐กโ๐๐ก 20 ๐๐ฆ๐ก๐ ๐๐ข๐๐๐๐ฆ โ๐๐ โ? ๐ธ๐๐๐๐๐๐ ๐ค๐ ๐ ๐๐ค ๐๐๐โ ๐๐ข๐ก๐๐ข๐ก โ๐๐ ๐ ๐ ๐๐๐๐๐ก๐๐ข๐๐พ๐๐ฆ (๐๐ข๐๐๐ ๐๐๐ โ๐๐ค ๐ก๐ ๐ ๐๐๐๐ ๐กโ๐ ๐๐ข๐ก๐๐ข๐ก). ๐ด๐๐ ๐, ๐๐๐๐๐๐ ๐กโ๐๐ก ๐กโ๐ ๐๐๐๐ข๐ก ๐ก๐ ๐๐๐ ๐ก๐๐๐๐ ๐๐๐ก๐๐๐ ๐๐ ๐กโ๐ ๐๐ข๐ก๐๐ข๐ก ๐๐๐๐ ๐๐๐๐กโ๐๐. ๐โ๐ 20 ๐๐ฆ๐ก๐ ๐๐ข๐๐๐๐ฆ โ๐๐ โ ๐๐ ๐๐ฅ๐ก๐๐๐๐ก๐๐ ๐๐๐๐ ๐กโ๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐ ๐๐ข๐ก๐๐ข๐ก'๐ ๐ ๐๐๐๐๐ก๐๐ข๐๐พ๐๐ฆ. Hereโs the ๐ฌ๐๐ซ๐ข๐ฉ๐ญ๐๐จ๐๐ for the example weโre working on: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning13.png Lastly, three important hashes are required. The first is ๐ก๐๐ฌ๐ก๐๐ซ๐๐ฏ๐จ๐ฎ๐ญ๐ฌ. Itโs the double SHA256 hash of all input outpoints (outpoint = the transaction id + output index) The second is ๐ก๐๐ฌ๐ก๐๐๐ช๐ฎ๐๐ง๐๐, the double SHA256 hash of all input sequence numbers. The third is ๐ก๐๐ฌ๐ก๐๐ฎ๐ญ๐ฉ๐ฎ๐ญ๐ฌ, the double SHA256 hash of all outputs. Thatโs everything (finally!). Letโs put it all together into something that can be signed! When signing a transaction, the spender actually signs a hash of the transaction data, not the entire transaction itself. This hash is called the ๐ฌ๐ข๐ ๐ก๐๐ฌ๐ก. The data used to create the sighash is called the ๐ฉ๐ซ๐๐ข๐ฆ๐๐ ๐. For a transaction input, the preimage is made of these items: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning14.png The sighash_type indicates which parts of the transaction the signature is committing to. https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning15.png After hashing the preimage twice with SHA-256, weโre left with the sighash. At last! Itโs time to do some signing! https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning16.png There are a few steps for signing a segwit (v0) transaction. First, the signerโs private key is used to create an ECDSA signature for the sighash. The resulting signature has two parts, ๐ and ๐ . In ECDSA, there are actually two valid s values for every signature: a "high" value and a "low" value. Both are mathematically valid, but bitcoin requires using the low s value to prevent transaction malleability (that means altering a transaction's ID!) After selecting the low s value, the signature must be encoded into DER format. This is how itโs structured: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning17.png And hereโs what the DER encoded signature looks like for our example: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning18.png The last step is to add a byte at the end for the sighash type. If we look back at the preimage made earlier we see this example is using SIGHASH_ALL (0x01). The full code for the signing step looks like this: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning19.png Remember the transaction witness field we set space aside for? Itโs now time to put the signature in it ๐ https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning20.png This is how the witness field is structured: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning21.png Which works out to be this for our example: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning22.png With the completion of the witness field, the transaction is now signed! https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning23.png This is what the final signed transaction hex looks like broken down: https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning24.png Bonus: You can use the Bitcoin Core CLI decoderawtransaction command to examine all the parts of the raw transaction hex https://technicaldifficulties.io/nostr/bdp/segwittxsigning/txsigning25.png * ~ * ~ * ~ * ~ * ~ * ~ If you made it to the end, give yourself a pat on the back. If you enjoyed it, be sure to like this post so we know to make more like it! * ~ * ~ * ~ * ~ * ~ * ~ This material is from Decoding Bitcoin, your go-to resource for understanding bitcoin, #privacy, and #decentralization. You can visit https://bitcoindevs.xyz/decoding/transaction-signing for the full lesson with all the code examples, as well as more free, interactive content. For more of a challenge, play chapters 4, 5, and 6 of @nprofileโฆfqsf (https://savingsatoshi.com) to learn about public-private key cryptography, digital signatures, and transaction building ๐บ https://technicaldifficulties.io/nostr/bdp/segwittxsigning/savingsatoshi.jpg Hope you learned something new about transaction signing. If you enjoyed this, share it with a friend and donโt forget to follow us, @nprofileโฆuvtq for more content like this. Thanks for reading! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Weโve got a good #DecodingBitcoin post for you today. The topic? ๐๐ง๐๐ข๐๐ง๐ง๐๐ฌ๐ฌ, AKA the order of bytes in a computerโs memory. When we put it like that it sounds a little boring, but thereโs something interesting, and dare we say ๐๐๐๐๐ฆ๐๐๐, about how bitcoin handles endiannessโฆ Before we get to that, letโs better understand what endianness is. Imagine reading directions in different languages: while English is written and read from left to right, Arabic text flows from right to left. https://technicaldifficulties.io/nostr/bdp/endianness_1.png Similarly, computers have two ways to store data: 1. ๐๐ข๐ -๐๐ง๐๐ข๐๐ง (BE): Most significant byte first 2. ๐๐ข๐ญ๐ญ๐ฅ๐-๐๐ง๐๐ข๐๐ง (LE): Least significant byte first https://technicaldifficulties.io/nostr/bdp/endianness_2.png When computers with different byte orders try to communicate, they can misread each other. Itโs like two people reading numbers from opposite directions. https://technicaldifficulties.io/nostr/bdp/endianness_3.png ๐๐ข๐ -๐๐ง๐๐ข๐๐ง ๐ฌ๐ญ๐จ๐ซ๐๐ฌ ๐ญ๐ก๐ ๐ฆ๐จ๐ฌ๐ญ ๐ฌ๐ข๐ ๐ง๐ข๐๐ข๐๐๐ง๐ญ ๐๐ฒ๐ญ๐ ๐๐ข๐ซ๐ฌ๐ญ. This is similar to how humans read numbers and Hex in most cases: starting with the most important information. Suppose we want to store the number 12345678 (hexadecimal: 0x00BC614E) in memory. In big-endian, the bytes are stored in this order: 00 BC 61 4E https://technicaldifficulties.io/nostr/bdp/endianness_4.png Observe that: - The ๐ฆ๐จ๐ฌ๐ญ ๐ฌ๐ข๐ ๐ง๐ข๐๐ข๐๐๐ง๐ญ ๐๐ฒ๐ญ๐ (00) is stored at the ๐ฅ๐จ๐ฐ๐๐ฌ๐ญ ๐ฆ๐๐ฆ๐จ๐ซ๐ฒ ๐๐๐๐ซ๐๐ฌ๐ฌ (00). - The ๐ฅ๐๐๐ฌ๐ญ ๐ฌ๐ข๐ ๐ง๐ข๐๐ข๐๐๐ง๐ญ ๐๐ฒ๐ญ๐ (4E) is stored at the ๐ก๐ข๐ ๐ก๐๐ฌ๐ญ ๐๐๐๐ซ๐๐ฌ๐ฌ (03). Big-endian is considered more "human-readable" because the data is stored in the order we naturally read it. ๐๐ข๐ญ๐ญ๐ฅ๐-๐๐ง๐๐ข๐๐ง ๐ฌ๐ญ๐จ๐ซ๐๐ฌ ๐ญ๐ก๐ ๐ฅ๐๐๐ฌ๐ญ ๐ฌ๐ข๐ ๐ง๐ข๐๐ข๐๐๐ง๐ญ ๐๐ฒ๐ญ๐ ๐๐ข๐ซ๐ฌ๐ญ. This might feel counter intuitive to humans but is more efficient for modern processors. Using the same number 12345678 (0x00BC614E), here's how it looks in little-endian: 4E 61 BC 00 https://technicaldifficulties.io/nostr/bdp/endianness_5.png This time, the ๐ฅ๐๐๐ฌ๐ญ ๐ฌ๐ข๐ ๐ง๐ข๐๐ข๐๐๐ง๐ญ ๐๐ฒ๐ญ๐ (4E) is stored at the ๐ฅ๐จ๐ฐ๐๐ฌ๐ญ ๐ฆ๐๐ฆ๐จ๐ซ๐ฒ ๐๐๐๐ซ๐๐ฌ๐ฌ (00). The ๐ฆ๐จ๐ฌ๐ญ ๐ฌ๐ข๐ ๐ง๐ข๐๐ข๐๐๐ง๐ญ ๐๐ฒ๐ญ๐ (00) is stored at the ๐ก๐ข๐ ๐ก๐๐ฌ๐ญ ๐๐๐๐ซ๐๐ฌ๐ฌ (03). This "reversal" of bytes is common in the Bitcoin Core codebase. In bitcoin, most data like transaction IDs, block headers, and amounts are all in little-endian format or with the bytes reversed. https://technicaldifficulties.io/nostr/bdp/endianness_6.png ๐๐๐ก๐: ๐ธ๐๐๐๐๐๐๐๐ ๐ ๐๐๐๐ฆ ๐๐๐๐๐๐๐ ๐ก๐ ๐๐๐ก๐๐๐๐๐ . ๐ผ๐ก ๐๐ ๐๐๐ก ๐๐๐๐๐๐๐ก ๐ก๐ ๐ ๐๐ฆ ๐ โ๐๐ โ ๐๐ ๐๐๐ก๐ก๐๐-๐๐๐๐๐๐. ๐๐๐๐๐ ๐กโ๐๐๐โ๐ ๐๐ ๐๐๐๐๐๐๐๐ ๐ก๐๐๐ ๐๐๐ ๐กโ๐๐ ๐ค๐ ๐ ๐๐ฆ โ๐๐ฆ๐ก๐ ๐ ๐ค๐๐๐๐๐โ ๐๐ โ๐๐๐ฃ๐๐๐ ๐ ๐๐ฆ๐ก๐๐ โ. For readability, the bytes are swapped back to the style of big-endian when this data is displayed to humans. A block explorer is one example of where you can see this. Bitcoin Coreโs JSON-RPC interface was the first time block hashes were printed for human consumption. That was when someone decided to reverse the ordering of hash so that it looked like a human readable integer. https://technicaldifficulties.io/nostr/bdp/endianness_7.png It turns out the real block hash, the actual sha256 value you get if you compute the hash yourself, is: e4b1d56439d46d9070e58c4368cccc97596fa908daf101000000000000000000 The zeros are actually on the right! At first glance it looks like this is a very large number, but we know the integer value of a block hash actually gets smaller as the difficulty increases. It's clear that the bytes are reversed and in the style of little-endian. But why? We can thank Satoshi for that. Satoshi decided to interpret the block hash as a little-endian integer. The more zeroes there are on the right side, the smaller the (little-endian) integer. Since most modern CPUs are little-endian, bitcoin uses it to optimize performance. However, network protocols typically use big-endian, creating a mismatch ๐ Big-endian is used for network communication (network byte order). Little-endian is used for bitcoinโs internal storage. This duality requires developers to frequently, and sometimes frustratingly, convert between the two formats when working with bitcoin data. Have you been the victim of an endianness oversight when writing bitcoin code? It's a common source of pain for developers new to bitcoin (and even the seasoned ones!) As covered by the transaction ID example earlier, byte order confusion can be common. https://technicaldifficulties.io/nostr/bdp/endianness_8.png Another gotcha is length specification. When converting to little-endian, always specify the correct byte length: https://technicaldifficulties.io/nostr/bdp/endianness_9.png Hope you learned something new about endianness today. If you enjoyed this, share it with a friend and donโt forget to follow us, @nprofileโฆuvtq ! This material is from Decoding Bitcoin, your go-to resource for understanding #bitcoin, privacy, and decentralization. Visit https://bitcoindevs.xyz/decoding for the full lesson, and more free, interactive content. Thanks for reading! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Thank you so much! Appreciate your support ๐ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs There is an oft-repeated sentiment in the community that bitcoin does not need you. While bitcoin is designed to be resilient, we ๐๐ need you. Bitcoin needs all the talent and energy it can gather to solve some of the most difficult technical problems of our time. Bitcoin in your hands changes everything. https://m.primal.net/NyXB.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Thank you! We will pass your kind words onto our designers :) npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Itโs #DecodingBitcoin time! Letโs go over the basic elements of a transaction. Alice wants to send 5 BTC to Bob. She needs to create a bitcoin transaction using the unspent outputs (UTXOs) in her wallet. https://m.primal.net/NyTN.png UTXOs are unspent transaction outputs. They can be used as inputs for new transactions. Think of them as "coins" in a wallet, waiting to be spent. Alice checks her wallet and finds two UTXOs: https://m.primal.net/NyTS.png To create a transaction, Alice has to specify exactly which UTXOs to spend. A UTXO is identified by the transaction it came from, specifically - the transaction ID and - an index that says where the UTXO is in the list of transaction outputs https://m.primal.net/NyTY.png Wallets usually store this information for you but you can also look it up on the blockchain. Alice's wallet shows these available UTXOs: - UTXO #1: 4 BTC (from Transaction 1, Output Index 1) - UTXO #2: 2 BTC (from Transaction 2, Output Index 0) Together, they provide enough funds (4 BTC + 2 BTC = 6 BTC) for the payment and any transaction fees. Now Alice has everything she needs to identify her UTXOs. As she adds them to the transaction, she saves space for the signatures she will make later. These signatures authorize the spending of the UTXOs. https://m.primal.net/NyTd.png Now that the transaction inputs have been taken care of, itโs time to look at the outputs! Alice needs to create two outputs: - 5 BTC to Bob (the payment amount) - 0.99 BTC back to Alice as change (there is a 0.01 BTC transaction fee) https://m.primal.net/NyTg.png Why do we have to make a separate output for change? UTXOs must be spent in their entirety. You cannot partially spend a UTXO. Instead, you create a new output that sends the excess amount back to yourself as change. https://m.primal.net/NyTl.png Looks good! The transaction structure is now complete, but itโs not yet valid. Alice must sign it to prove she owns the inputs. Weโll cover that in a future lesson ๐ Follow us @nprofileโฆuvtq to stay updated! This material is from Decoding Bitcoin, your go-to resource for understanding #bitcoin, privacy, and decentralization. If you enjoyed it, visit https://bitcoindevs.xyz/decoding for the full lesson, and more free, interactive content. Thanks for reading! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Are you tired of searching for "lightning" only to get results about sparks in the sky and ice hockey teams in Florida? So are we. That's why we built Bitcoin Search, which pulls from a curated list of credible #bitcoin tech sources. https://bitcoinsearch.xyz We've built the world's largest collection of technical bitcoin-related resources: articles, podcast transcripts, blog posts, and more. Sources are regularly monitored to make sure your search results are up-to-date. We hand-pick sources for their contributions to technical bitcoin concepts. Examples include the Bitcoin-dev Mailing List, LN dev Mailing List, Bitcoin Optech, and many more. Bookmark it and try it out today! https://m.primal.net/NlEE.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Hooray we finally did it! Thanks for the reminder ๐ธ Proof of PR: https://github.com/bitcoin-dev-project/bitcoin-dev-project/pull/146 https://m.primal.net/NjjD.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs What's the deal with #bitcoin fees? How are they calculated? Where do they go? Let's have a look with a #DecodingBitcoin post: A transaction's fee is equal to the total amount of bitcoin in the inputs, minus the total amount of bitcoin in the outputs. https://m.primal.net/Nggr.png Here's how to calculate the fee for this transaction: https://mempool.space/tx/c27c4d2236fce2a7542e024408d7f89b95e50e42a2c3d10be499c3102ccb45ef Fee = Input - (Output1 + Output2) Fee = 299.99430000 - (0.00140000 + 299.99240000) Fee = 299.99430000 - 299.99380000 Fee = 0.00050000 Fee = 50,000 sats Remember: Sum(Inputs) should always be greater than Sum(Outputs) https://m.primal.net/Nggt.png Fees incentivise miners to include transactions in blocks. Without fees, miners would have little reason to put transactions into blocks! In addition to fees, miners also receive a block reward. Total miner revenue = fees + block reward https://m.primal.net/Nggy.png How do miners decide what transactions go into a block? The short answer is miners will usually maximize revenue by prioritizing transactions with the highest fee rate (we've got a whole lesson fee rates coming!) https://m.primal.net/NghA.png While miners can choose which transactions to include based on fees, there's a minimum threshold, a "minimum relay fee" that must be met just for a transaction to be relayed through the network. Transactions below this threshold are rejected by nodes. It helps prevent spam and DoS attacks on the network https://m.primal.net/NghD.png This brings us to an important question: What happens if you submit a transaction with a fee rate above the minimum but still too low for current network conditions? That transaction could sit in the mempool for hours because the fee rate is too low for the high level of network activity. Even if you met the minimum, there can still be plenty of transactions with higher fee rates than yours, ones that miners will choose first. https://m.primal.net/NghE.png At this point, you have two main ways to "unstick" it: 1. RBF (Replace-by-Fee) 2. CPFP (Child Pays for Parent) -------------------------------- That's all for now! We'll dive deeper into fee rates, RBF, and CPFP in a future post. This material is from Decoding Bitcoin, your go-to resource for understanding #bitcoin, privacy, and decentralization. If you enjoyed it, visit https://bitcoindevs.xyz/decoding for the full lesson, and more free, interactive content! And don't forget to follow us for more posts about bitcoin tech and tools to help you in your developer journey ๐ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Psst. Don't have enough hours in the day to read the mailing list and Delving Bitcoin? We have a secret weapon for you. Bitcoin TLDR has daily summaries, available by post or by thread: https://tldr.bitcoinsearch.xyz Here's today's summary of the bitcoin-dev mailing list: - Ava Chow announced Bitcoin Core version 28.1. It makes adjustments to p2p configurations to enhance usability & reduce startup failures. It also has internal ID counting updates, enhancements in key handling, build system improvements, & a call for community participation in reporting bugs and joining the announcement list - @nprofileโฆdmde raised concerns about the reliability of transaction timestamp data, specifically the vulnerability of nLockTime. It can be manipulated for unfair prioritization benefits, undermining the effectiveness of new prioritization rules. - Yuval Kogman critiqued misconceptions around privacy mechanisms, focusing on wabisabi credentials & Wasabi wallet. He sheds light on the challenges with safeguarding privacy and security, emphasizing transparency, comprehensive security measures, & ethical considerations. https://m.primal.net/NfUn.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Thanks for sharing Ross ๐ Enjoy! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Let's talk about the 2 ways to track user balances on decentralized networks. Time for a #decodingbitcoin post: 1. Account Model (Ethereum): Tracks balances like a bank ledger (simple and intuitive). 2. UTXO Model (Bitcoin): Tracks specific unspent outputs from transactions (complex but powerful) https://m.primal.net/Nagm.png The account model is like your bank statement. Simple to understand and works well with smart contracts. The downside is it's less private and can be vulnerable to replay attacks. https://m.primal.net/Nago.png The UTXO model is like bills in a wallet. UTXOs (unspent transaction outputs) can only be spent once. Each transaction creates new UTXOs, and your balance is the sum of all your unspent UTXOs https://m.primal.net/Nagx.png This model has better privacy, prevents double spending, and allows for parallel transaction processing. The cons are it's more difficult to understand, is harder for complex applications, and requires UTXO management. Here's a comparison chart of the two models: https://m.primal.net/Nagp.png This material is from Decoding Bitcoin, your go-to resource for understanding #bitcoin, privacy, and decentralization. If you enjoyed it, visit https://bitcoindevs.xyz/decoding for the full lesson, and follow us for more free educational #bitcoin content! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Like this note if youโre the worldโs best โฟOSS contributor. Repost if youโre going to become one this year. https://m.primal.net/NZXC.jpg npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs While Bitcoin Core is mostly C++ and Python, there are many great bitcoin projects written in Rust including LDK, Stratum V2, and Fedimint! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Enjoy! Give it a go and let us know what you think ๐ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs oh dear! thanks for letting us know. we'll get that sorted out ๐ซก npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs oops. going to have a word with our social media intern ๐ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs good catch! ๐ธ that link should be to: https://savingsatoshi.com/ npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Want to learn #Rust but don't know where to start? We have a free course that covers the fundamentals of Rust using bitcoin based exercises. It's the best of both worlds. ๐ฆ rust + bitcoin = ๐งก https://btcdemy.thinkific.com https://bitcoindevs.xyz/_next/static/media/btc-demy.60731301.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs ๐ Help us save Satoshi! And learn the fundamentals of bitcoin tech while youโre at it ๐ข Introducing Saving Satoshi! The worldโs first interactive, practice-focused game to teach you bitcoin development. www.savingsatoshi.com Bitcoin tech can be hard to learn. Yes, there are many incredible resources. Our goal is to complement them and add our drop of interactivity to the ocean of learning. Try Saving Satoshi today! https://image.nostr.build/547d5f07b3c6912c5a351270c4b138100104572a10a5bf7e409cb92d3c1f8509.png What will you learn? - How to find and decode the hidden message in the genesis block - Elliptic curve cryptography - Message signing and verification - Building a transaction - Building a block template - Bitcoin Script - How the Lightning network works - And so, so much more! How is Saving Satoshi different? - Logged in state to remember your progress - Ability to share accomplishments publicly - A real story to motivate you to learn - Free and Open Source https://image.nostr.build/f6b466dd0621495ac6339fc06ff979d8724189f68ea7fffa6ed598d38fad1b4e.png Saving Satoshi started as a hackathon idea: โHow can we make bitcoin tech education more engaging and fun?โ Since then itโs become a game with 10 fun chapters, and support for both Python and JavaScript Worldwide there are groups like TabConf and Scalar School playing together. https://image.nostr.build/1c3adc83581cb1e2645da8ad65de6bf71dc5880d3c71d0da645d43463cd77fdc.jpg Give Saving Satoshi a go today, and let us know what you think. Shoutout to the team that helped bring this over the finish line https://image.nostr.build/8b28802f8e9dab7abe19725194898890c783b48e0113237146f7690edae83415.jpg Now be quick, Satoshi needs you! www.savingsatoshi.com npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs ๐ Decoding Bitcoin! An interactive, exercise-first way to learn bitcoin development 100% free and open-source ๐ Dive into bitcoin tech with us below! https://bitcoindevs.xyz/decoding Decoding Bitcoin makes learning bitcoin tech easier, funner, and more efficient It gives you the perfect mix of - Concise explanations - Real-world exercises - Tons of interactive demos https://image.nostr.build/16d5efa3ed839858f74ea709ae1d712c530ea024599671cbd9831516d797a179.jpg Being able to play with interactive elements to understand Bitcoin concepts is the best way to solidify a working mental model https://image.nostr.build/903f2dc837dae0c4d2b063f6ff710b984fb47ddbd76bf492fc356f75099e6824.gif No libraries allowed, youโll craft everything from scratch! We support both JavaScript and Python (of course!) Each bitcoin concept comes with its own exercise, so youโll learn not just how things work, but also when and where to use them. https://image.nostr.build/8e50c7c926389a8b39ac2fceef705f4031af604fd23bc36d8e62062938b3347e.png By the end of each module, youโll challenge yourself by creating a project to test your understanding. https://image.nostr.build/c25ba3054e667f53b163033f44f9f8df198db160d51ed59e5cfa24c82c30f34b.png Weโve started with the first module on Scripts. More content is coming soon! Please share your feedback on this first releaseโit helps us understand what you want to see next, whether itโs content or new features. npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Incredible walkthrough of our ecosystem! Thank you to @npub1gjyโฆektz for the deep dive! We look forward to building more products, services, and infrastructure to enable the world to study and contribute to bitcoin FOSS. #note1jnlโฆqhj3 npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs You spoke, we listened ๐ https://image.nostr.build/9ec2895b3e6521278f0ad821c6bb01b26c5261274188f7cdb3756fc5fc321e8f.jpg npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs ๐ข Introducing Bitcoin Search v2 Want to find that one specific technical bitcoin nugget? Youโre in luck! There is only one place that allows you to search the depths of bitcoinโs technical ecosystem and retrieve the highest signal info about bitcoin tech. ๐๐ https://www.bitcoinsearch.xyz Bitcoin Search is unique Unlike Google, when you search for โlightningโ We actually know what you mean (Hint: Itโs not electric sparks in the sky. Or an ice hockey team in Florida). https://image.nostr.build/e838c8e404a555ab984daf2fc4211791214175dbbd660b0eec04633d65d3e6a8.jpg Features We let you sort and filter by categories that matter - Authors and - Sources And in ways that matter - Relevance and - Date And with views you love: dark ๐ & light ๐ Scope The scope of the product is laser focused: bitcoin tech Users can suggest sources deeper in the product. This bolsters our repo of bitcoin tech sources We build pathways to scrape the data Which grows our library of bitcoin tech literature and resources Ecosystem of Knowledge Creation Bitcoin Search thrives as a collaborative ecosystem. As you do more Transcript Reviews and suggest new credible sources, our database continuously expands and improves, ultimately benefiting the entire Bitcoin technical community. Itโs a virtuous cycle of knowledge creation https://image.nostr.build/e53f38fa46cacd4c402e300d5482f474907f3f2a9aef4ed9f9ac0aa4832c682c.png We already had a live V1. Why build a V2? We wanted to improve comprehension of the product for newer devs interested in bitcoin tech While improving its usability, and increasing a sense of delight when using it. https://image.nostr.build/ea145bef4a6ee0fe88b976c149bbc59f9abe2535bb4d27fe2b8d46709ff66ab0.png Biggest thanks to the team! Dev: Emmanuel, Solomon, Balogun, Otuedon Design: @npub1xglโฆfmlc Dev Lead: Theo Vision: Jonas Product: @npub1a6nโฆs58k So, give Bitcoin Search a go! https://www.bitcoinsearch.xyz Tell us what you like and donโt like. Whatโs missing. What should we do better? And importantly - what kinds of products and tools are missing for bitcoin devs and builders in the ecosystem? npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Want to contribute to #Bitcoin FOSS development But don't know where to start? ๐ข Introducing Bitcoin Good First Issues! A tool designed specifically for devs just entering bitcoin development. https://bitcoindevs.xyz/good-first-issues ๐ค We know itโs hard to guess which projects to start with and what issues to tackle. Bitcoin Good First Issues gathers beginner-friendly issues labelled Bug, Help Wanted, and (heh) Good First Issues. It pulls them live for your from vetted Free Open Source Software projects. ๐ ๏ธ Why Give It a Go? - Vetted Projects - Easy Navigation - Lowered Barrier to Entry Whether you're just starting or already a developer, Bitcoin Good First Issues is built to accelerate your contributions. Give it a roll and make a difference! Letโs build the future of bitcoin together. ๐ฉโ๐ป Check the image below to learn how the data flow works: https://image.nostr.build/d06ce33d05df50add214ae4fc481b8cfb6d81c32616cfae6c364d8deb16f3b58.png ๐ค Biggest thanks to our team! - Vision: Theo - Ideation: Emmanuel, Solomon, Abubakar Ismail - Design: Theo with thanks to paperpsych - Dev: Theo, Solomon, Balogun - Product: @npub1a6nโฆs58k ๐ Examples of vetted FOSS projects in Bitcoin Good First Issues - BDK - Core LN - Eclair - Fedimint - LDK - Polar - Stratum Mining We're looking forward to your feedback! npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Better search For better learning And better buidling Coming. https://i.nostr.build/KGXjg.png npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Soon ๐ https://image.nostr.build/5f86372e97ace4751d7ff9b065cf3668a05c78404d7b8ab0ac366720d6ace892.jpg npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs We're building a ton of products - Tool to make bitcoin concepts easier to grok - Tool to make it easier to find issues to work on - Tool to remove friction in finding bitcoin-related technical content Soon npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs ๐ #note1u38โฆz5c0 npub10p33xu03t8q7d9nxtks63dq4gmt4v4d3ppd5lcdp4rg9hxsd0f8q7mn2l2 bitcoin_devs Hello, world!