The pending_block member of database was a premature optimization and had an
unfortunate tendency to get out of sync, especially when switching forks.
This commit removes it, and substantially improves the handling of transactions
when switching forks. Specifically, flooding or forking no longer causes nodes to
discard valid transactions.
- update fc to fix crash in websocket message handling
- added api to verify transactions without broadcasting them
- added api to broadcast a block produced outside the P2P network or
witness
- with this change the fork database now caches blocks that do not link
and attempts to link the unlinked blocks after every new block is
successfully linked.
- with this change the fork database only tracks blocks as far back as
the undo history allows. This significantly reduces memory usage when
there is high witness participation.
When subscribing to an account via the get_full_account API it will
start streaming any object relevant to the account that is added,
removed, or modified.
The blockchain now has a minimal participation requirement that can only
be overridden with checkpoints. Any time participation falls below a
minimal level no new blocks may be added.
Currently it requires 66% participation and tolerates short periods of
time below 66% participation with a maximum of 500 consecutive blocks
missed. For every two blocks produced 1 can be missed with a slack of
999 bias.
This is done to comply with the policy that transactions should be self
describing and not depend upon implied state. This makes things easier
for everyone to understand exactly when a transaction will be invalid
without having to refer to chain state.
1. Implement a TaPoS assert operation predicate that offers full block ID
validation for transactions that want the added security. This is only
required for transactions that are of high value and transfer control of
funds to a newly created identifier and where the witnesses cannot be
trusted.
2. Remove the full block ID from the transaction digest generation.
- remove circular dependency with fee_schedule
- unitiy build db_* as database.cpp
- move protocol definitions in separate directory
- combined some objects/evaluators
- combined limit/call evaluator/objects into market_evaluator.*
- this is a major refactor of the code and may have broken some behavior
in the wallet or witness nodes.
- this commit changes the serialization of operations
- the chain_tests pass
- refactor how signatures are stored on the transaction, removing key_id
and extra_signatures maps and replacing with a vector
- verify that each key only signs one time
- update tests to handle stricter policies on signatures