open-bounty
open-bounty copied to clipboard
Store transaction hashes in a separate table
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 bytransaction_hash
has been mined -
execute_hash
- set when the PR was merged and fund withdrawal procedure is initiated -
confirm_hash
- set when tx referenced byexecute_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 theconfirm_hash
defined about -
payout_receipt
- set when the tx referenced bypayout_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 thepayout_receipt
,executeTransaction
method is invoked on the contract. This is done inupdate-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
.