Skip to content

Issue 683 Requirements

John M. Jones edited this page Mar 16, 2018 · 5 revisions

bitshares-core Issue 683 - Skip updating certain secondary indexes during replay

Issue can be found here: https://github.com/bitshares/bitshares-core/issues/683

Additional Details:

According to libraries/chain/db_init.cpp:

The account_index has 2 secondary indexes

  1. account_number_index
  2. account_referrer_index

The proposal_index has 1 secondary index

  1. required_approval_index

These indexes are kept updated during the replay process. These indexes should be generated from the current chain state, and not constantly updated during the replay process. Making this change will result in a faster replay process.

Changes required:

The system must be able to determine that a replay is in progress. Once determined, any updates should bypass updating the secondary indexes.

Once the replay process is complete, the secondary indexes can be generated.

It appears that the majority of the code changes will reside in libraries/chain/db_management.cpp. The reindex method is called when a replay is required.

Clone this wiki locally