Wire Sysio Wire Sysion 1.0.0
|
Public Types | |
using | permission_set_t = std::set<chain::permission_level> |
using | cached_trace_map_t = std::map<chain::transaction_id_type, chain::transaction_trace_ptr> |
using | onblock_trace_t = std::optional<chain::transaction_trace_ptr> |
using | time_map_t = std::map<fc::time_point, uint32_t> |
using | name_bimap_t = bimap<multiset_of<weighted<chain::permission_level>>, multiset_of<permission_info::cref>> |
using | key_bimap_t = bimap<multiset_of<weighted<chain::public_key_type>>, multiset_of<permission_info::cref>> |
Public Member Functions | |
account_query_db_impl (const chain::controller &controller) | |
void | build_account_query_map () |
void | add_to_bimaps (const permission_info &pi, const chain::permission_object &po) |
void | remove_from_bimaps (const permission_info &pi) |
bool | is_rollback_required (const chain::block_state_ptr &bsp) const |
uint32_t | last_updated_time_to_height (const fc::time_point &last_updated) |
void | rollback_to_before (const chain::block_state_ptr &bsp) |
void | cache_transaction_trace (const chain::transaction_trace_ptr &trace) |
auto | commit_block_prelock (const chain::block_state_ptr &bsp) const |
void | commit_block (const chain::block_state_ptr &bsp) |
account_query_db::get_accounts_by_authorizers_result | get_accounts_by_authorizers (const account_query_db::get_accounts_by_authorizers_params &args) const |
Public Attributes | |
const chain::controller & | controller |
the controller to read data from | |
cached_trace_map_t | cached_trace_map |
temporary cache of uncommitted traces | |
onblock_trace_t | onblock_trace |
temporary cache of on_block trace | |
time_map_t | time_to_block_num |
permission_info_index_t | permission_info_index |
multi-index that holds ephemeral indices | |
name_bimap_t | name_bimap |
many:many bimap of names:permission_infos | |
key_bimap_t | key_bimap |
many:many bimap of keys:permission_infos | |
std::shared_mutex | rw_mutex |
mutex for read/write locking on the Multi-index and bimaps | |
Implementation details of the account query DB
Definition at line 131 of file account_query_db.cpp.
using sysio::chain_apis::account_query_db_impl::cached_trace_map_t = std::map<chain::transaction_id_type, chain::transaction_trace_ptr> |
Convenience aliases
Definition at line 482 of file account_query_db.cpp.
using sysio::chain_apis::account_query_db_impl::key_bimap_t = bimap<multiset_of<weighted<chain::public_key_type>>, multiset_of<permission_info::cref>> |
Definition at line 495 of file account_query_db.cpp.
using sysio::chain_apis::account_query_db_impl::name_bimap_t = bimap<multiset_of<weighted<chain::permission_level>>, multiset_of<permission_info::cref>> |
Definition at line 494 of file account_query_db.cpp.
using sysio::chain_apis::account_query_db_impl::onblock_trace_t = std::optional<chain::transaction_trace_ptr> |
Definition at line 483 of file account_query_db.cpp.
using sysio::chain_apis::account_query_db_impl::permission_set_t = std::set<chain::permission_level> |
Definition at line 302 of file account_query_db.cpp.
using sysio::chain_apis::account_query_db_impl::time_map_t = std::map<fc::time_point, uint32_t> |
Definition at line 489 of file account_query_db.cpp.
|
inline |
Definition at line 132 of file account_query_db.cpp.
|
inline |
Add a permission to the bimaps for keys and accounts
pi | - the ephemeral permission info structure being added |
po | - the chain data associted with this permission |
Definition at line 171 of file account_query_db.cpp.
|
inline |
Build the initial database from the chain controller by extracting the information contained in the blockchain state at the current HEAD
Definition at line 140 of file account_query_db.cpp.
|
inline |
Store a potentially relevant transaction trace in a short lived cache so that it can be processed if its committed to by a block
trace |
Definition at line 286 of file account_query_db.cpp.
|
inline |
Commit a block of transactions to the account query DB transaction traces need to be in the cache prior to this call
bsp |
Definition at line 363 of file account_query_db.cpp.
|
inline |
Pre-Commit step with const qualifier to guarantee it does not mutate the thread-safe data set
bsp |
process traces to find updateauth
and deleteauth
calls maintaining a final set of permissions to either update or delete. Intra-block changes are discarded
Definition at line 308 of file account_query_db.cpp.
|
inline |
Add a range of results
Definition at line 420 of file account_query_db.cpp.
|
inline |
Definition at line 198 of file account_query_db.cpp.
|
inline |
Definition at line 215 of file account_query_db.cpp.
|
inline |
Remove a permission from the bimaps for keys and accounts
pi | - the ephemeral permission info structure being removed |
Definition at line 188 of file account_query_db.cpp.
|
inline |
Given a block number, remove all permissions that were last updated at or after that block number this will effectively roll back the database to just before the incoming block
For each removed entry, this will create a new entry if there exists an equivalent {owner, name} permission at the HEAD state of the chain.
bsp | - the block to rollback before |
Definition at line 237 of file account_query_db.cpp.
cached_trace_map_t sysio::chain_apis::account_query_db_impl::cached_trace_map |
Definition at line 486 of file account_query_db.cpp.
const chain::controller& sysio::chain_apis::account_query_db_impl::controller |
Definition at line 485 of file account_query_db.cpp.
key_bimap_t sysio::chain_apis::account_query_db_impl::key_bimap |
Definition at line 503 of file account_query_db.cpp.
name_bimap_t sysio::chain_apis::account_query_db_impl::name_bimap |
Definition at line 502 of file account_query_db.cpp.
onblock_trace_t sysio::chain_apis::account_query_db_impl::onblock_trace |
Definition at line 487 of file account_query_db.cpp.
permission_info_index_t sysio::chain_apis::account_query_db_impl::permission_info_index |
Definition at line 501 of file account_query_db.cpp.
|
mutable |
Definition at line 505 of file account_query_db.cpp.
time_map_t sysio::chain_apis::account_query_db_impl::time_to_block_num |
Definition at line 490 of file account_query_db.cpp.