* make min_wtema difficulty chain type dependent
* fix bad graph weights for automated and user testing
* only mainnet can get wtema difficulty unstuck at 59s blocks
* HardFork4 initial commit
* HF4 obsoletes secondary_scale, which becomes an nonce extension 8->12 bytes
* fix TESTNET_FOURTH_HARD_FORK height
* improve predicted height for testnet fork on dec 8
* move local variable as suggested by antiochp
* More efficient serialization for bitmap segments
* Rename a const
* Correctly count number of chunks in a segment
* Enum for BitmapBlock (de)ser mode
* Add more segments in test
* Fix duplicate function
* add segmenter for generating segments from txhashset with consistent rewind
* rework segmenter to take a txhashset wrapped in rwlock
rework our rewindable pmmr so we can convert to readonly easily
* placeholder code for rewinding readonly txhashset extension to build a rangeproof segment
* segment creation for outputs/rangeproofs/kernels/bitmaps
* placeholder segment impl
* commit
* rework segmenter to use a cached bitmap (rewind is expensive)
* cache segmenter instance based on current archive header
* integrate the real segment and segment identifier with our segmenter
* exercise the segmenter code on chain init
* wrap accumulator in an arc, no need to clone each time
* Chunk generation and validation
* Rename chunk -> segment
* Missed a few
* Generate and validate merkle proof
* Fix bugs in generation and validation
* Add test for unprunable MMR of various sizes
* Add missing docs
* Remove unused functions
* Remove segment error variant on chain error type
* Simplify calculation by using a Vec instead of HashMap
* Use vectors in segment definition
* Compare subtree root during tests
* Add test of segments for a prunable mmr
* Remove assertion
* Only send intermediary hashes for prunable MMRs
* Get hash from file directly
* Require both leaves if one of them is not pruned
* More pruning tests
* Add segment (de)serialization
* Require sorted vectors in segment deser
* Store pos and data separately in segment
* Rename log_size -> height
* Fix bitmap index in root calculation
* Add validation function for output (bitmap) MMRs
* Remove left over debug statements
* Fix test
* Edge case: final segment with uneven number of leaves
* Use last_pos instead of segment_last_pos
* Simplify pruning in test
* Add leaf and hash iterators
* Support fully pruned segments
* Drop backend before deleting dir in pruned_segment test
* Simplify output of first_unpruned_parent
* first pass at peers iter cleanup
* more flexible peer with diff lookups
* PeersIter with impl Iterator
* sync against outbound peers
reorder peers filters so expensive filters come later
* filter peers by capabilities during sync
* prefer outbound peers with high total difficulty
* with_difficulty now takes a fn to allow more flexible comparisons based on difficulty
* rename peers_iter() -> iter()
* cleanup mining stats; make edge_bits dynamic (last size submitted), dont show bogus stats when no miners are connected
Co-authored-by: Quentin Le Sceller <q.lesceller@gmail.com>
* Introduce CommitOnly variant of Inputs.
Introduce CommitWrapper so we can sort commit only inputs correctly.
* rememebr to resort if converting
* write inputs based on variant and protocol version
* read and write protocol version specific inputs
* store full blocks in local db in v3
convert to v2 when relaying to v2 peers
* add debug version_str for inputs
* no assumptions about spent index sort order
* add additional version debug logs
* fix ser/deser tests for proto v3
* cleanup coinbase maturity
* rework pool to better handle v2 conversion robustly
* cleanup txpool add_to_pool
* fix nrd kernel test
* move init conversion earlier
* cleanup
* cleanup based on PR feedback
* refactor output to have internal output identifier
refactor to use AsRef for output identifier
make the output MMR explicit in terms of output identifiers
* put the serde deser back for rangeproof
* add json test for transactions
* use mmr sizes in header to validate block weight given header only
* add global weight validaton to headers when reading them untrusted off the network
* fixup tests, one pending test
* add test for deserializing untrusted block header exceeeding weight limits
* validate header mmr sizes, must grow for each block
* remove redundant height check
* fix tests after rebase
block specific TooHeavy error