peerplays_migrated/libraries/protocol
Nathaniel f9fcffbb4d
Safety Check: Part 2 -- Implement and Integrate Checks
Implement a safety check mechanism on object_database, based on the
safety_check_policy abstract interface. Create two standard
implementations of the safety_check_policy interface, one
(null_safety_check) which allows all modifications unconditionally, and
the other (database_lock_safety_check) which allows modifications only
when unlocked.

Integrate these safety checks into chain::database and plugins, so that
the consensus databases are locked at all times except during core
consensus code pathways. Also ensures that databases are re-locked when
calling code outside of consensus pathways from consensus pathways.

To make this work, it was necessary to move two objects from the
consensus object spaces to a new API object space. The
operation_history_object and account_transaction_history_object were
moved to the API object space, as they are not actually used by
consensus and are maintained by a plugin (which can no longer modify the
consensus object spaces, due to the safety checks).

Finally, add a mechanism to application and chain::database, which
allows the chain to start in "unit testing mode" and allows unchecked
actions upon the database within delimited scopes. This was necessary
because many tests edit the database directly to set up the environment
for their respective tests. This mode is activated by database_fixture so
tests can utilize it conveniently, but it is architecturally difficult to
enable this mode in production, i.e. from a plugin.
2022-03-12 14:04:08 -06:00
..
include/graphene/protocol Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
account.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
account_role.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
address.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
assert.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
asset.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
asset_ops.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
authority.cpp Ref !3/#376: Graphene Updates 2021-11-11 11:25:47 -05:00
betting_market.cpp General fixes 2020-08-23 14:51:45 -05:00
block.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
chain_parameters.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
CMakeLists.txt Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
committee_member.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
confidential.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
custom.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
custom_account_authority.cpp Final fixes 2020-08-25 13:01:51 -05:00
custom_permission.cpp Ref !3/#376: Graphene Updates 2021-11-11 11:25:47 -05:00
event.cpp General fixes 2020-08-23 14:51:45 -05:00
event_group.cpp General fixes 2020-08-23 14:51:45 -05:00
fee_schedule.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
lottery_ops.cpp General fixes 2020-08-23 14:51:45 -05:00
market.cpp Externalized serialization in protocol library 2020-08-23 14:43:21 -05:00
memo.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
nft.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
nft_lottery.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
offer.cpp Final fixes 2020-08-25 13:01:51 -05:00
operations.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
proposal.cpp Ref !3/#376: Graphene Updates 2021-11-11 11:25:47 -05:00
pts_address.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
small_ops.cpp Ref !3/#376: Graphene Updates 2021-11-11 11:25:47 -05:00
special_authority.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
sport.cpp General fixes 2020-08-23 14:51:45 -05:00
tournament.cpp General fixes 2020-08-23 14:51:45 -05:00
transaction.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
transfer.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
types.cpp Externalized serialization in protocol library 2020-08-23 14:43:21 -05:00
vote.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
withdraw_permission.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
witness.cpp General fixes 2020-08-23 14:51:45 -05:00
worker.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00