open-bounty icon indicating copy to clipboard operation
open-bounty copied to clipboard

Store transaction hashes in a separate table

Open vitvly opened this issue 6 years ago • 0 comments

Description

There is currently a plethora of various tx hashes that are stored in the issues table. These pertain to different stages of tx lifecycle and include:

  • transaction_hash - set when contract is deployed
  • contract_address - set when tx referenced by transaction_hash has been mined
  • execute_hash - set when the PR was merged and fund withdrawal procedure is initiated
  • confirm_hash - set when tx referenced by execute_hash has been mined
  • watch_hash - periodically set by the scheduler when token balances need to be updated on the contract; is reset to nil once mined
  • payout_hash - set when the payout has been confirmed using the confirm_hash defined about
  • payout_receipt - set when the tx referenced by payout_hash has been mined

There is also one hash that is not stored currently, but most likely should:

  • execute_transaction_hash - once we have obtained the payout_receipt, executeTransaction method is invoked on the contract. This is done in update-payout-receipt thread.

Solution

Create a separate table tx_info(issue_id, hash, type, timestamp) that will hold the above data and link it to issues.

vitvly avatar Apr 26 '18 16:04 vitvly