Skip to content

Conversation

jtimon
Copy link
Contributor

@jtimon jtimon commented Apr 13, 2015

ContextualCheckBlockHeader() [which is needed to verify a block header] depends on CBlockIndex::GetMedianTimePast but the goal is for verify block header is to be independent from chain.o and CBlockIndex C++ class [which cannot be exposed in the consensus C API].
This is also contained in #5995.

@jtimon
Copy link
Contributor Author

jtimon commented Apr 20, 2015

Needed rebase.

@jtimon jtimon force-pushed the consensus_mediantime branch from e370994 to 243841f Compare April 29, 2015 14:15
@jtimon
Copy link
Contributor Author

jtimon commented Apr 29, 2015

Needed rebase.

@sipa
Copy link
Member

sipa commented Apr 30, 2015

utACK

@sipa
Copy link
Member

sipa commented Jun 16, 2015

Needs rebase.

@jtimon
Copy link
Contributor Author

jtimon commented Jun 16, 2015

@sipa I know, but I'm waiting for #6051 to be merged since it will require another rebase after that.

@jtimon jtimon force-pushed the consensus_mediantime branch from 243841f to 704737c Compare June 21, 2015 13:01
@jtimon
Copy link
Contributor Author

jtimon commented Jun 21, 2015

Rebased


#include "chain.h"

#include <algorithm>
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: tailing whitespace

@petertodd
Copy link
Contributor

Modulo nit, (somewhat tested) ACK.

@jtimon jtimon force-pushed the consensus_mediantime branch from 704737c to db2894f Compare June 25, 2015 17:13
@jtimon
Copy link
Contributor Author

jtimon commented Jun 25, 2015

@petertodd 's nit fixed.

@btcdrak
Copy link
Contributor

btcdrak commented Jun 26, 2015

utACK

@jtimon
Copy link
Contributor Author

jtimon commented Jul 15, 2015

Closing for now

EDIT: as said on #6051 I'm not convinced anymore that is a good idea to create consensus/txverify.cpp and consensus/blockverify.cpp instead of just consensus/consensus.cpp.

@jtimon jtimon closed this Jul 15, 2015
@jtimon jtimon reopened this Aug 26, 2015
@jtimon jtimon force-pushed the consensus_mediantime branch from db2894f to da6dfe3 Compare August 26, 2015 08:24
@jtimon
Copy link
Contributor Author

jtimon commented Aug 26, 2015

Rebased and reopened.

theuni and others added 6 commits September 13, 2015 18:16
…tion number

This is a no-op change. For now, everything passes MAX_BLOCK_SIZE / 60, so the
result matches what it would've before.

Tests use a number equal to the number of transactions where necessary,
to ensure that they're never rejected when blocksizesize isn't being tested.
This is a no-op change. For now, everything passes MAX_BLOCK_SIZE, so the
result matches what it would've before.

Tests use a value of std::numeric_limits<uint64_t>::max() where necessary, to ensure that they're never
rejected when size isn't being tested.
…sus.h (as functions)

The following are now tied to a chain rather than being defined as global
constants. Their values have not changed.

nMinTxSize
nMaxBlockSize
nMaxTxSize
nMaxBlockSigops
nCoinbaseMaturity

Also, for free (diff-wise):

Blocksize: Turn MAX_BLOCK_SIZE (nMaxBlockSize) and MAX_BLOCK_SIGOPS (nMaxBlockSigops) into functions

...which take Consensus::Params as parameter
This will be convenient to reduce the diff of any proposal that changes the blocksize as a hardfork
…tions:

-CheckBlockHeader
-ContextualCheckBlockHeader
-CheckBlock
-ContextualCheckBlock

Also add nTime parameter to CheckBlockHeader and CheckBlock.
Also use the oportunity to rename the functions inside the Consensus namespace.
…dent function

...and CBlockIndex::nMedianTimeSpan into Consensus::Params::nMedianTimeSpan
@jtimon jtimon force-pushed the consensus_mediantime branch from 718f6f2 to c85ded0 Compare September 13, 2015 17:00
@jtimon
Copy link
Contributor Author

jtimon commented Sep 13, 2015

Rebased on top of #6591. Still had merging conflicts so rebased on top of master after that.

@dcousens
Copy link
Contributor

utACK for c85ded0 after nit is addressed

@jtimon
Copy link
Contributor Author

jtimon commented Sep 14, 2015

Closing in favor of #6672 .

@jtimon jtimon closed this Sep 14, 2015
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants