aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/block.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge AuxPoW support from NamecoreRoss Nicoll2018-09-191-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are as below: Wrap CBlockHeader::nVersion into a new class (CBlockVersion). This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID. Update getauxblock.py for new 'generate' RPC call. Add 'auxpow' to block JSON. Accept auxpow as PoW verification. Add unit tests for auxpow verification. Add check for memory-layout of CBlockVersion. Weaken auxpow chain ID checks for the testnet. Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks. Use this to disable the checks on testnet. Introduce CPureBlockHeader. Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two. Differentiate between uint256 and arith_uint256. This change was done upstream, modify the auxpow code. Add missing lock in auxpow_tests. Fix REST header check for auxpow headers. Those can be longer, thus take that into account. Also perform the check actually on an auxpow header. Correctly set the coinbase for getauxblock results. Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be. (BIP30 block height and COINBASE_FLAGS.) Implement getauxblock plus regression test. Turn auxpow test into FIXTURE test. This allows using of the Params() calls. Move CMerkleTx code to auxpow.cpp. Otherwise we get linker errors when building without wallet. Fix rebase with BIP66. Update the code to handle BIP66's nVersion=3. Enforce that auxpow parent blocks have no auxpow block version. This is for compatibility with namecoind. See also https://github.com/namecoin/namecoin/pull/199. Move auxpow-related parameters to Consensus::Params.
* Litecoin: Scrypt n=1024 Pow hash based upon Colin Percival's Tarnsnap (2009) ↵Warren Togami2018-09-191-0/+2
| | | | Modified by Artforz, coblee, pooler, wtogami, Nikolay Belikov, Adrian Gallagher
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Introduce convenience type CTransactionRefPieter Wuille2016-11-191-1/+1
|
* Make CBlock::vtx a vector of shared_ptr<CTransaction>Pieter Wuille2016-11-191-1/+1
|
* Get rid of nType and nVersionPieter Wuille2016-11-071-4/+5
| | | | | | | | | | | Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
* Rename "block cost" to "block weight"Suhas Daftuar2016-07-181-2/+2
|
* BIP141: Other consensus critical limits, and BIP145Pieter Wuille2016-06-221-0/+3
| | | | Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
* BIP144: Serialization, hashes, relay (sender side)Pieter Wuille2016-06-221-2/+0
| | | | | | Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
* BIP9 ImplementationPieter Wuille2016-03-151-2/+1
| | | | | Inspired by former implementations by Eric Lombrozo and Rusty Russell, and based on code by Jorge Timon.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Switch blocks to a constant-space Merkle root/branch algorithm.Pieter Wuille2015-11-271-6/+0
| | | | | | | | | | | This switches the Merkle tree logic for blocks to one that runs in constant (small) space. The old code is moved to tests, and a new test is added that for various combinations of block sizes, transaction positions to compute a branch for, and mutations: * Verifies that the old code and new code agree for the Merkle root. * Verifies that the old code and new code agree for the Merkle branch. * Verifies that the computed Merkle branch is valid. * Verifies that mutations don't change the Merkle root. * Verifies that mutations are correctly detected.
* Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logicPeter Todd2015-10-081-1/+1
| | | | | Based on the earlier BIP66 soft-fork logic implemented by Pieter Wuille's 5a47811da5158df763aa2fca09ce646ee0c51e7b
* Avoid duplicate CheckBlock checksPieter Wuille2015-09-221-0/+4
|
* Do not store Merkle branches in the wallet.Pieter Wuille2015-09-221-8/+2
| | | | | | | | | | Assume that when a wallet transaction has a valid block hash and transaction position in it, the transaction is actually there. We're already trusting wallet data in a much more fundamental way anyway. To prevent backward compatibility issues, a new record is used for storing the block locator in the wallet. Old wallets will see a wallet file synchronized up to the genesis block, and rescan automatically.
* Consensus: Create consensus/consensus.h with some constantsjtimon2015-04-201-3/+0
|
* BIP66 changeover logicPieter Wuille2015-02-011-1/+1
|
* Merge pull request #5520Wladimir J. van der Laan2015-01-061-1/+1
|\ | | | | | | | | bdb6a71 IsNull doesn't change CBlockLocator, add const hint (Pavel Janík) 1b37333 Remove no longer needed declaration of CBlockLocator (Pavel Janík)
| * IsNull doesn't change CBlockLocator, add const hintPavel Janík2014-12-201-1/+1
| |
* | Replace direct use of 0 with SetNull and IsNullWladimir J. van der Laan2015-01-051-2/+2
| | | | | | | | | | | | Replace x=0 with .SetNull(), x==0 with IsNull(), x!=0 with !IsNull(). Replace uses of uint256(0) with uint256().
* | Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | | | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* | Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|/
* Move CMerkleBlock and CPartialMerkleTree to their own fileMatt Corallo2014-12-051-0/+3
|
* MOVEONLY: core/ -> primitives/Luke Dashjr2014-12-031-0/+168