blockchain-core
blockchain-core copied to clipboard
Txn validation stages
Continuation of @Vagabond's work started in https://github.com/helium/blockchain-core/tree/adt/validation-stages . Rebase was messy, so I started from scratch.
TODO
general
- [ ]
limits.hrl
- [ ] 32, 64 bit int, etc
- [ ] convert int
{min, N}
s to{range, N, ?MAX_INT64}
? - [-] take ledger instead of chain arg
- [~]
is_absorbable
XXX Reverted, because chain is used to lookup validation parameters in some txs, at least the bundle looks up the max size chain var. - [~]
absorb
XXX Chain is passed to blockchain_ledger_v1:debit_fee in several txns- [ ] decide
- keep chain param or
- grab chain from blockchain_worker?
- [ ] decide
- [~]
- [x] maybe a ternary codomain, rather than just boolean, because a bad nonce
may mean a txn is still absorbable in some (bound) future
-
yes | no | not_yet
-
- [x] opportunistically re-order so that expensive things (e.g. crypto) are checked last (or not at all if previous checks fail)
- [x] remove unused modules:
- [x]
src/transactions/v1/blockchain_txn_token_burn_exchange_rate_v1.erl
- [x]
- [x] better generic value validation library
- mark long
is_valid
s for later factorization, to be done in another PR