menu

Aragon

Aragon is the most powerful and modular way to run DAOs

Channels
# All channels
view-forward
# Announcements
view-forward
# App development
view-forward
# Aragon Agent
view-forward
# Aragon Client
view-forward
# Aragon Connect
view-forward
# aragonOS
view-forward
# aragonUI
view-forward
# Feature requests
view-forward
Team

When action succeeds but voting fails

March 30, 2020 at 2:28pm

When action succeeds but voting fails

March 30, 2020 at 2:28pm
How is the following possible?
I create an action (of my app) for voting as the permission to the action is assigned to the voting manager successfully.
Then I try to vote Yes for the action and get: "Action impossible. The action failed to execute. You may not have the required permissions." I however can successfully vote No.
I wonder, how it does happen that I can create an action but can't vote for it. Isn't the correctness of the action (no require()s) checked when the action is created? (By the way, how is it checked? Is the EVM code executed in the browser before sending to the network to check if the action is correct?)
I assume that the EVM code executed in the browser before sending to the network, because when I have an exception in my EVM code, it is not allowed not only to vote for but even to create a vote for it. Right?

March 30, 2020 at 3:17pm
We do not do any checks when creating the vote (but we should—there's an open issue for this). Right now, when you're trying to vote 'yes', only then are we checking if the action would suceed (and in this case, it is not).
  • reply
  • like
Is there any way to debug which require() (or whatever) fails during the voting?
  • reply
  • like
One way would be to skip the vote altogether and assign the permission to your account address. And then call the function directly with truffle console or truffle debug. You should be able to have more information on where it is failing.
Edited
  • reply
  • like
Also making sure that you have error messages in your require() calls.
  • reply
  • like
Truffle v5.1 also has a new debug feature. I haven't tried it yet but it looks promising.
  • reply
  • like

April 3, 2020 at 12:52am
I have the same issue and found some very strange behavior connected to it. I have two vote buttons calling smart contract methods with two input arguments. Clicking any of them produces the aforementioned permission problem.
If I add another button calling a method with zero input arguments, it works if I use the new button before the others. I described the problem in detail in this issue: https://github.com/Michael-A-Heuer/ArborVote/issues/3
Edited
  • reply
  • like
(Took me 4 hours to figure this out 😬)
  • reply
  • like
That is indeed a strange behavior. I should be able to have a look at your app tomorrow. Just to be sure, this is not a problem found in the official Aragon Voting App but in the ArborVote app?
Edited
  • reply
  • like
Yes, I had the problem in the ArborVote app. I started from the /aragon-react-boilerplate and quickly got stuck with this error. Basically, I just renamed the app, added my smart contract and tried out some buidler plugins (gas reporter, solhint, coverage).
  • reply
  • like

April 4, 2020 at 4:18pm
Hey , there was simply an error when the function was executed. If I add the following two lines at the beginning of the voteFor(uint8 id, uint8 voteStrength) function, it executes successfully:
voters[msg.sender].joined = true;
voters[msg.sender].voteTokens = INITIALVOTETOKENS;
Edited
  • reply
  • like

April 6, 2020 at 8:13am
Oh no, you are right. I feel deeply ashamed now. Sorry!
  • reply
  • like