* WIP remove failure from all `Cargo.toml`
* WIP remove `extern crate failure_derive`
* Use `thiserror` to fix all errors
* StoreErr is still a tuple
* Remove another set of unnecessary `.into()`s
* update fuzz tests
* update pool/fuzz dependencies in cargo.lock
* small changes based on feedback
Co-authored-by: trevyn <trevyn-git@protonmail.com>
* add parameter fast_validation to the api
* arg `verify-chain` on node client
* arg verify chain + read_timeout parameter
* change timeout to 2hours
* update with tromp review
* 2nd comment from tromp
* replace bitvec with more efficient bitpack algorithm
* optimise proof_unpack_len
* move proof pack length calculation
* small refactor
* first pass attempt at not deserializing proof nonces in difficulty iter
* another 10 seconds gained by not deserialising the proof from the difficulty iterator
* add new deser parameters to tests where needed
* add skip_proof variants to store
* remove hash from difficulty iterator struct, rename HeaderInfo to HeaderDifficultyInfo
* replace bitvec with more efficient bitpack algorithm
* optimise proof_unpack_len
* move proof pack length calculation
* small refactor
* first pass attempt at not deserializing proof nonces in difficulty iter
* another 10 seconds gained by not deserialising the proof from the difficulty iterator
* add new deser parameters to tests where needed
* add skip_proof variants to store
* remove hash from difficulty iterator struct, rename HeaderInfo to HeaderDifficultyInfo
* wip - "reset_head" via owner api functionality
* jsonrpc pass hash in as a string
* sort of works
* not a reorg if we simply accept several blocks at once
* remember to reset header MMR separately
as it is readonly when interacting with txhashset extension
* basic client integration
needs error handling etc.
* reset sync status when reset chain head
* track "denylist" (todo) and validate headers against this via the ctx
* track denylist (header hashes) in chain itself
* header denylist in play
* expose invalidateheader as client cmd
* rework reset_chain_head - rewind txhashset then header MMR
* fix for comparing scaled vs unscaled difficulty
fix mix use of scaled and unscaled, add additional comments to clarify which values are which
improved consistency - scaled and unscaled difficulty
* combine from_proof_unscaled() and to_unscaled_difficulty{}
* code review - rust syntax
* track sync_head on header_sync sync status
follow header fork as appropriate
* track highest_diff alongside highest_height on HeaderSync status
* cleanup
* not not
* wip - body sync for full archive
* allow chain compaction during sync
* placeholder for logic to ensure archive nodes sync from archive nodes
* body sync from archival peers
* allow chain compaction during sync
* placeholder for logic to ensure archive nodes sync from archive nodes
* add column ordering, set mining workers table to sort the connected workers to the top by default
* add column ordering, set mining workers table to sort the connected workers to the top by default
* Mining TUI fixes and updates
* add FeeFields type
* use FeeFields with ::zero and try_into().unwrap()
* fixed tests
* avoid 0 accept_base_fee
* add aggregate_fee_fields method for transaction
* implement std::fmt::Display trait for FeeFields
* make base_fee argument non-optional in libtx::mod::tx_fee
* add global and thread local accept_fee_base; use to simplify tests
* set unusually high fee base for a change
* revert to optional base fee argument; default coming from either grin-{server,wallet}.toml
* remove optional base fee argument; can be set with global::set_local_accept_fee_base instead
* define constant global::DEFAULT_ACCEPT_FEE_BASE and set global value
* add Transaction::accept_fee() method and use
* Manual (de)ser impl on FeeFields
* fix comment bug
* Serialize FeeFields as int in tx
* allow feefields: u32:into() for tests
* try adding height args everywhere
* make FeeFields shift/fee methods height dependent
* prior to hf4 feefield testing
* rename selected fee_fields back to fee for serialization compatibility
* fix test_fee_fields test, merge conflict, and doctest use of obsolete fee_fields
* make accept_fee height dependent
* Accept any u64 in FeeFields deser
Co-authored-by: Jasper van der Maarel <j@sper.dev>
* 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