Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot move proposal to the next phase #5

Open
AndlerRL opened this issue Jul 12, 2023 · 4 comments
Open

Cannot move proposal to the next phase #5

AndlerRL opened this issue Jul 12, 2023 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@AndlerRL
Copy link

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:

  • move action signer: andlerz52254 EOS account
  • proposal author: andler52254 EOS account
  • proposal type: main
  • proposal phase: debate
  • proposal phase end: 2023-07-10T23:15:57.976+00:00 July 10th, 2023 at 23:15:57hr GMT+0
  • proposal start at: 2023-07-03T23:15:57.976+00:00 July 3rd, 2023 at 23:15:57hr GMT+0
  • proposal debate duration in days: 7 part of global proposal config
  • proposal id: 4
  • error message received: assertion failure with message: required attribute: referendum_id_phase_debate not found

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:

  • move action signer: andlerz52254 EOS account
  • proposal author: andler52254 EOS account
  • proposal type: changetime
  • proposal phase: vote
  • proposal phase end: 2023-07-06T01:29:30.273+00:00 July 6th, 2023 at 1:29:30hr GMT+0
  • proposal phase start: 2023-07-04T01:29:30.273+00:00 July 2nd, 2023 at 1:29:30hr GMT+0
  • proposal vote duration in days: 2 part of global proposal config
  • proposal id: 9
  • error message received: assertion failure with message: required attribute: referendum_id_phase_vote not found

Details (screenshot)

image

Technically I'm receiving the same error on both cases, something that was actually mentioned and Originally posted by @tlacloc in #4 (comment) 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 AndlerRL added the bug Something isn't working label Jul 12, 2023
@AndlerRL AndlerRL added the help wanted Extra attention is needed label Nov 14, 2024
@AndlerRL
Copy link
Author

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
Copy link
Author

AndlerRL commented Nov 14, 2024

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

cc - @jdheeter

@jdheeter
Copy link
Contributor

Hello 👋

I think I found the root of the issue related to the quorum asset precision, there was some disagreements between the definitions of the referendum table definition I resolved here.

jdheeter@c129219

after fixing this issue, I'm no longer getting the error when trying to read the table

Decoding error at root<referendum_table>.quorum<asset>: Invalid asset symbol, precision too large when reading the table

I also am in the process of rewriting the tests using the vert framework here, previously the test was failing on this line with the error above (trying to read the table) jdheeter@c129219#diff-d09dcde6de3e2988bae334979c2dfcaea54853333acfc22d6adb53b62c3b9c39R156

and now the test passes this line but fails with the error

     Error: eosio_assert: proposal can not end, the associated referendum is still in progress

when attempting to call move, so think my test is missing a step or finish action not being called correctly. You can run the test just run yarn inside the test folder of my branch and then yarn test. Using vert emulator so no need for a local nodeos instance or docker.

I also updated the contracts to compile in the latest cdt and using my build.sh script in the root, it was being built using a very old cdt docker image.

@tlacloc
Copy link
Contributor

tlacloc commented Dec 2, 2024

Hello, @jdheeter!

Awesome, thanks for the enhancements for the build and tests of the smart contract. I'll check your fork of the project to review the failing tests tho it looks like it's indeed related to the finish action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants