11

Both answers by James C. and sanket1729 are very good, but I wanted to give a very high-level answer: Miniscript is an intermediate more structured representation for actual Bitcoin Scripts. It is useful as a toolbox because it simplifies static analysis of scripts, and things like generic signing. The policy language is intended to simplify designing ...


7

At a high level: The policy is compiled to Minsicript. Miniscript is encoded to bitcoin Script. (One to One Mapping) Bitcoin Script is decoded back to Miniscript. (One to One Mapping) Policy and Miniscript can both be lifted to another representation for static analysis. Following invariants are respected in Miniscript: Let ms be a miniscript, s be ...


7

Miniscript doesn't compile down to script. It encodes a subset of all Bitcoin script. It is a (very crafty) template language which reduces the Bitcoin script language to specific script expressions which are composable, which means the properties of a miniscript expression only depend on the property of its children. Properties include malleability, ...


5

Bitcoin Core probably will never have a "1.0". 1.0 is a socially significant number which indicates some kind of finality or completeness (at least initially). This itself is holding back developers from declaring that there may even be a 1.0 or creating some timeline for a 1.0. Bitcoin Core is being continuously developed and there is no point at which many ...


5

There are benefits to both users and developers to having Bitcoin Core split into separate node, wallet and GUI processes. As Alyssa Hertig outlines here the benefit to users will be being able to run the Bitcoin Core node on a different machine to the Bitcoin Core wallet rather than being forced to run them on the same machine. A user could leave a node ...


4

From https://github.com/bitcoin/bitcoin/blob/v0.18.1/CONTRIBUTING.md#peer-review: Anyone may participate in peer review which is expressed by comments in the pull request. Typically reviewers will review the code for obvious errors, as well as test out the patch set and opine on the technical merits of the patch. Project maintainers take into account the ...


4

Since the very beginning. Transactions have had the nLockTime field since Bitcoin 0.1.0.


4

You cannot. There have been both changes to the P2P protocol that prevent this, and changes to the way that nodes are discovered. The method which 0.1.0 discovered new nodes was by joining the #bitcoin channel on freenode. Your IP address would be encoded in a certain way and that would be the IRC nick for your node. However this has long since been removed ...


4

The coinbase transaction is added to a block template by a miner: https://github.com/bitcoin/bitcoin/blob/4af01b37d40246cd1fdb54719855927e36a36b46/src/miner.cpp#L157-L167 When the block is solved, the entire block is broadcast to the network. Outside of a new block, you'll never see a subsidy transaction being broadcast on their own. Here's the logic that ...


4

The scriptSig field of a coinbase transaction is special. It doesn't need any signatures at all, as no coins are being spent. The ability to produce new coins, which that input represents, is inherent to the protocol - every block is allowed some fixed amount of produced coins. Requiring a signature on it would be wasteful and pointless. Which key should we ...


4

When you import a key, you can mark it as trusted. Usually, you would do this after meeting the owner of a key and verifying that they actually control the key, e.g. at a CryptoParty. Since it is infeasible for each user to verify every other user in person, PGP/GPG leverages a "web-of-trust" to establish connections between keys. E.g. Alice has ...


3

MAST/TAPROOT SCHNORR These improvements are specified in BIP340, BIP341, and BIP342. These documents are fairly mature, and there seems to be community traction for them (though, disclaimer: I may be biased as I'm a co-author), but it's inherently hard to predict when activation will happen. Submarine Swaps This is a Lightning feature, as far as I know. ...


3

This is the output for all platforms at the moment, not just MacOS. To paraphrase from sipa on IRC: The first summary is bitcoin's own summary: because of some hackery to run unit tests in parallel, it currently shows no tests (even though they are executed). The second and third summary are the output from make check for the built-in dependencies, ...


2

It depends on your specific data directory. Bitcoin Core uses a LevelDB database for the index and LevelDB handles the exact storage format and files of the database. This can be different for every data directory. There is no particular file that that record is stored in that Bitcoin Core knows.


2

In a sense, such a command would be trusting a third party: any putative answer would be that given by whoever supplied that code to you; and it may not be trustworthy - it could tell you it was 21 million, but behind the scenes actually use, say, 42 million. The nearest you could do would be to download the source code from a proper source and, having ...


2

How can [Bitcoin] ...achieve mass usage status as payment method? I suspect much research has been done in this area. Privacy is an important obstacle but not the only one. Motivations and Barriers for End-User Adoption of Bitcoin as Digital Currency. Presthus and O'Malley, 2017 The largest group, the non-users, state that they are awaiting for others ...


2

Bitcoins themselves are fungible, and addresses are designed to be for one-time-use only. It really comes down to how you use it, and it is entirely possible to transact using Bitcoin in a private manner. If the user is naive and has poor practices, then it is possible to track their financial history. But if the user is smart and uses best practices (no ...


2

Community, what is the current state of privacy related BIPs? CoinJoin related ones: Adam Gibson's SNICKER draft, which permits a simple unidirectional CoinJoin construction. BIP 79, Bustapay, a standard for CoinJoined payments. P2P improvements: BIP 156, Dandelion: routing newly broadcast transactions a few hops before broadcasting. Draft for BIP 324: ...


2

Since you are choosing to use network specific sections in your config file, Core requires you to have certain arguments in those sections, such as rpcport. So you need to move rpcport into a network specific section.


2

BIP 342 does exactly this (Thanks Pieter)


2

Since it was set to an error by Satoshi and not a SUCCESS, this would be a hardfork for all clients in-between no matter if this was already used onchain before. Just imagine a miner with the new software (which redefines VER as SUCCESS) mining a transaction containing such an OP. All the clients between 0.3.5 and the new one would refuse the block, while ...


2

there are two type of segwit as P2SH starting with 3 and Native SegWit (bech32) starting with bc1, but don't know which of the two segwit one, is better and is compatible to transfer and receive from a legacy one? Generally speaking the "bc1" native SegWit address is better. It's completely redesigned comparing to the classical/legacy Base58 ...


2

NOTES: Heigh and Version fields Fields height and version are needed to identify Outputs if they are last spent in the Transaction outputs. In older revxx.dat files, only if Output was last unspent in a Transaction it's height will be there together with it’s Transaction’s Version. If it's a regular Output then the height field will be 0 (00 HEX in Varint ...


2

It does not need to as the coinbase transaction of each block does not spend any other transaction, hence does not need to satisfy the conditions set by the scriptPubKey of an existing output.


1

It is De facto standard that address should not be reused. Indeed. and even Bitcoin officially emphasis address should not be reused. There is nothing official, anywhere, in Bitcoin. Does the same condition apply for Multi-signature address ? Yes. If Yes apart from privacy what is the need ? Privacy - for you and those you interact with - is pretty ...


1

Bitcoin Core does not set the payout address. It can only do that when you use the internal miner (i.e. use the generatetoaddress command, but only on regtest). Otherwise, external mining software sets the address. This is because Bitcoin Core does not just send a complete block that the mining software just works on. Rather, those mining software use the ...


1

You're putting a script directly in the scriptPubKey. That's both discouraged, non-standard, and hard to use, as you've noticed there is no corresponding address. There are only three types of addresses defined (with common acceptance) in Bitcoin: base58-encoded P2PKH addresses (1...), base58-encoded P2SH addresses (3...), and bech32-encoded native segwit ...


1

I think this is a fair summary. I would hesitate to phase out unit tests, rather supplement them with property based tests. In a library I maintain called bitcoin-s we use them in tandem. Concepts There are two primary concepts in property based testing systems. The first one is a Generator. The point of a generator is to generate values you want to run ...


1

You're looking for validation.h and its corresponding .cpp source file. You should start at CChainState::ActivateBestChain. This subroutine calls CChainState::ActivateBestChainStep which runs the logic you're interested in - stepping one by one of the blocks, cleaning up and reorg'ing from lowest to highest PoW. First, ActivateBestChainStep walks the ...


1

This is specified in BIP 13: https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki You compute the Base58Check encoding of the P2SH version byte (5 for mainnet, 196 for testnet) followed by the 20-byte Hash160 of the script. The code you're quoting is for P2PKH addresses, not P2SH.


Only top voted, non community-wiki answers of a minimum length are eligible