peerplays_migrated/libraries/plugins
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
..
account_history Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
accounts_list Build optimizations (#403) 2020-11-12 19:38:25 +05:30
affiliate_stats Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
bookie Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
debug_witness Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
delayed_node Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
elasticsearch Resolve "port ES changes from Bitshares" 2022-01-31 05:25:56 +00:00
es_objects Resolve "port ES changes from Bitshares" 2022-02-08 11:26:34 -06:00
generate_genesis Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
generate_uia_sharedrop_genesis Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
market_history Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
peerplays_sidechain Merge remote-tracking branch 'glu/develop' into dapp-support 2022-02-13 14:25:06 -06:00
snapshot Build optimizations (#403) 2020-11-12 19:38:25 +05:30
witness Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
CMakeLists.txt Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30