bitcashorg / bitcash-contract-dho

1 stars 1 forks source link

Cannot move proposal to the next phase #5

Open AndlerRL opened 1 year ago

AndlerRL commented 1 year ago

After implementing the dBoard Worker, we started to notice some issues while trying to move one proposal from one phase to another. To make sure that if is the worker or not, I made a manual move action on the test contract testproposal.

Case 1

I created a new proposal on the app, passing to the key args the requested fields however, I found that when the times came to this proposal (endTime) I found that it wasn't moving to the next phase. On this test I made sure that:

Details (screenshot)

image

Case 2

Another thing that I notice is when we create changetime amendments: On the phasepconf I set up that proposals of type changetime will start at vote phase however, when I created one on the eos.dboard app, it did not receive a new referendum_id on the Smart Contract on the special parameters. I made sure that:

Details (screenshot)

image

Technically I'm receiving the same error on both cases, something that was actually mentioned and Originally posted by @tlacloc in https://github.com/bitcashorg/bitcash-contract-dho/issues/4#issuecomment-1619285278 where if we are not getting a referendum_id, then we have a bug.

This action however, notice that the move action only requests the proposal_id and a referendum_id is generated within the contract as an incremental as far as I understood. What could it be?

AndlerRL commented 18 hours ago

Issue Updates:

Main branch:

(Pre-Prod Deployed) Commits:

Several commits have comments within. For additional details, please take a look.

After tests and changes:

Issue 1:

While testing the Smart Contract actions, it was found that when moving to another phase wasn't happening in all scenarios. In the first scenario, moving from debate to pre-vote is now possible; however, when moving from pre-vote to vote, the contract validates the move to be invalid, due the referendum is still in progress, even though the time to pre-vote has ended. Screenshot below:

image

Issue 2:

While indexing the data at the Chaingraph, it tracks testrefendu1 and testproposal (preprod) contracts. Both contracts are sending the actions. However, testrefendu1 has difficulties displaying the data on the table_rows within Chaingraph, so as EOS clients and other indexers.

Issue 3 (related to issue 2 from above):

While processing the blocks on Chaingraph, it has been found to have issues with processing properties coming from the testrefendu1contract, details below:

image

Error Messages: [precision 90 should be <= 18] & [error unpacking eosio::chain::symbol] & [Error unpacking field sym] & [Error unpacking eosio::chain::asset] & [Unable to unpack built-in type 'asset' while processing 'referendum_table.quorum']

AndlerRL commented 18 hours ago

@tlacloc — any additional insight (debug made) about this, we can post it here 🙂