peerplays_migrated/libraries/chain
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
..
hardfork.d Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
include/graphene/chain Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
account_evaluator.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
account_object.cpp Enhance secondary_index 2022-01-03 09:49:44 -05:00
account_role_evaluator.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
affiliate_payout.cpp General fixes 2020-08-23 14:51:45 -05:00
assert_evaluator.cpp [License] Modify cpp and hpp headers to MIT #496 2016-01-07 11:44:52 -05:00
asset_evaluator.cpp Safety Check: Part 1 -- Evaluator Tagging 2022-03-07 16:37:53 -06:00
asset_object.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
balance_evaluator.cpp Externalized serialization in protocol library 2020-08-23 14:43:21 -05:00
betting_market_evaluator.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
betting_market_group_object.cpp Merge beatrice(GPOS changes) with master (#270) 2020-02-07 21:23:08 +05:30
betting_market_object.cpp General fixes 2020-08-23 14:51:45 -05:00
block_database.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
buyback.cpp Ref #1506: Isolate chain/protocol to its own library 2020-08-23 14:37:00 -05:00
CMakeLists.txt Remove database unity build 2022-01-02 14:32:56 -06:00
committee_member_evaluator.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
confidential_evaluator.cpp Safety Check: Part 1 -- Evaluator Tagging 2022-03-07 16:37:53 -06:00
custom_account_authority_evaluator.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
custom_permission_evaluator.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
database.cpp Remove database unity build 2022-01-02 14:32:56 -06:00
db_balance.cpp Remove as much warnings from build log as possible (#400) 2020-12-18 14:23:37 +01:00
db_bet.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
db_block.cpp Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
db_debug.cpp [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322) 2020-03-27 18:46:30 +01:00
db_getter.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
db_init.cpp Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
db_maint.cpp Fix build 2022-01-27 15:29:23 -06:00
db_management.cpp Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
db_market.cpp General fixes 2020-08-23 14:51:45 -05:00
db_notify.cpp Safety Check: Part 2 -- Implement and Integrate Checks 2022-03-12 14:04:08 -06:00
db_update.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
db_witness_schedule.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
evaluator.cpp Safety Check: Part 1 -- Evaluator Tagging 2022-03-07 16:37:53 -06:00
event_evaluator.cpp General fixes 2020-08-23 14:51:45 -05:00
event_group_evaluator.cpp Merged beatrice into 5050 2019-07-30 11:43:31 -04:00
event_group_object.cpp Merged beatrice into 5050 2019-07-30 11:43:31 -04:00
event_object.cpp Merge beatrice(GPOS changes) with master (#270) 2020-02-07 21:23:08 +05:30
exceptions.cpp General fixes 2020-08-23 14:51:45 -05:00
fba_object.cpp Implement FBA fee routing for STEALTH #563 2016-02-15 15:33:21 -05:00
fork_database.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
game_object.cpp Merge beatrice(GPOS changes) with master (#270) 2020-02-07 21:23:08 +05:30
genesis_state.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
get_config.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
is_authorized_asset.cpp Implement buyback accounts #538 2016-02-11 04:59:28 -05:00
lottery_evaluator.cpp Revert "[SON-107] Merge develop branch to SONs-base (#166)" 2019-10-08 15:44:13 +02:00
market_evaluator.cpp Safety Check: Part 1 -- Evaluator Tagging 2022-03-07 16:37:53 -06:00
match_object.cpp Merge beatrice(GPOS changes) with master (#270) 2020-02-07 21:23:08 +05:30
nft_evaluator.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
nft_lottery_evaluator.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
nft_lottery_object.cpp NFT Lottery (#384) 2021-01-28 20:27:54 +01:00
offer_evaluator.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
offer_object.cpp Enhance secondary_index 2022-01-03 09:49:44 -05:00
proposal_evaluator.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
proposal_object.cpp Enhance secondary_index 2022-01-03 09:49:44 -05:00
random_number_evaluator.cpp NFT Lottery (#384) 2021-01-28 20:27:54 +01:00
sidechain_address_evaluator.cpp SON for Hive 2021-11-18 17:32:30 +00:00
sidechain_transaction_evaluator.cpp SON for Hive 2021-11-18 17:32:30 +00:00
small_objects.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
son_evaluator.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
son_object.cpp Handle HARDFORK_SON_FOR_HIVE_TIME properly 2021-11-25 20:08:45 -04:00
son_wallet_deposit_evaluator.cpp SON for Hive 2021-11-18 17:32:30 +00:00
son_wallet_evaluator.cpp Merge Beatrice to Master (#408) 2020-12-14 19:40:27 +05:30
son_wallet_withdraw_evaluator.cpp SON for Hive 2021-11-18 17:32:30 +00:00
special_authority.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
sport_evaluator.cpp Merged beatrice into 5050 2019-07-30 11:43:31 -04:00
tournament_evaluator.cpp General fixes 2020-08-23 14:51:45 -05:00
tournament_object.cpp Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
transfer_evaluator.cpp inital 2017-05-25 12:13:59 +03:00
vesting_balance_evaluator.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
vesting_balance_object.cpp Merge branch master into graphene-updates 2021-11-09 16:24:26 -05:00
withdraw_permission_evaluator.cpp Remove now-redundant white_list bit check from evaluators #566 2016-02-11 04:02:33 -05:00
witness_evaluator.cpp Ref #1506: Isolate chain/protocol to its own library 2020-08-23 14:37:00 -05:00
worker_evaluator.cpp Ref #1506: Isolate chain/protocol to its own library 2020-08-23 14:37:00 -05:00