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.
- 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
The INITIAL_SUPPLY macro is generally not useful, and there's no good
way to fulfill the promise it creates. By removing it, I can skip the
scaling on the genesis values. Now, if there is an allocation at
genesis, the supply is determined by that allocation. Otherwise, the
supply is GRAPHENE_MAX_SHARE_SUPPLY and it all belongs to
GRAPHENE_COMMITTEE_ACCOUNT.
Also, remove one of the redundant and confusing MAX_SUPPLY macros and
unify the usage to always be GRAPHENE_MAX_SHARE_SUPPLY.
Reasons:
1. The protocol should not depend upon implementation details such as
how the database objects are structured or reflected
2. The protocol should deal in abstract concepts
3. Should use fc::datastream rather than istringstream for performance
and memory allocation reasons
4. Fees should be charged proportional to the size of the operation
5. Validate on the assert operation should also perform sanity checks
on types
6. Protocol definition objects should never depend upon the database
because they may be used in situations where the database and
evaluators are not present.
7. Reflected field names should never have '_' in them because they
become part of the *PUBLIC* json definition.
Generated by applying these commands to parent commit:
sed -i -e 's/\([a-z0-9]\+\).push_transaction[(]\([^()]*\)[)]/PUSH_TX( \1, \2 )/' tests/tests/*.cpp
sed -i -e 's/\([a-z0-9]\+\).push_block[(]\([^()]*\)[)]/PUSH_BLOCK( \1, \2 )/' tests/tests/*.cpp
When generating blocks until a timestamp, we now generate one block
immediately, then skip blocks until the timestamp, and generate a
final block then.
Also, this exposed a bug in the witness budget handling which
caused the undesired burning of core asset. This bug is now fixed.