Comments (12)
Maybe something like
- Send tx that encodes
forward(script)
to voting app () from staking app (
)
calls
attachMetadata(keccak(script), voteId)
on- ✨ Time passes ✨
- Iff...
In this example, the metadata can be used in the staking app to identify "stake pools" (see the repo in Aragon Labs for a brief explanation of what a stake pool is).
Other possible names for rejectForward
reject
(too vague)forwardFailed
(may be mistaken for forwarding a failed transaction)failedForward
Other possible names for attachMetadata
attachScriptIdentifier
(less vague)attachIdentifier
(vague)
The reason for attachMetadata
(as opposed to just identifying scripts solely by keccak(script)
) is that identifying e.g. stake pools using only keccak(script)
is impossible, since the script for creating a vote is different from voting in a vote.
Open issues
- What about apps that may not have metadata to attach? These will probably be apps that always only do 1 thing, such as the group app, so it might suffice for these to just attach
keccak(script)
as metadata. - What about gas costs?
- How do we guard the
attachMetadata
function to make sure no outsider calls it? - If this should work, then how frequently do we call
attachMetadata
? For example, for this to work, votes must also call back (if the caller is a forwarder contract) with the vote ID, which might be super gas intensive.
from aragon-apps.
I think generalizing it with something where forwarders call a standard function (reject
? failedForward
?) with some standardized data (a unique identifier for the app? or keccak256
of the failed script?) would be beneficial.
from aragon-apps.
This has to be a variable of the voting app, but we cannot set it in every vote, as it would allow to execute anything regardless of vote result.
from aragon-apps.
@izqui Can we just put this in the icebox for a moment? We might solve the actual issue another way, the more we've talked about this one the more uneasy I feel adding it
from aragon-apps.
Yes, removing it from the code freeze milestone for the moment
from aragon-apps.
A thought for the future: would it be possible to do this by standardizing a "failure" case in the forwarders? Right now, only the voting app can "fail" forwards (every other app just automatically approves a forward, given correct discovery mechanisms) but there will likely be more apps in the future that will require user interaction for approvals.
We can handle this via an override in the forwarder's interface:
function forward(bytes _actionEvmCallScript) public
function forward(bytes _actionEvmCallScript, failureEvmCallScript) public
from aragon-apps.
@sohkai Yes that was discussed, too, but the issue is that the two callscripts have to produce different outcomes.
Intuitively one would think that just checking if the two callscripts are different would suffice, but they might be different and still produce the same outcome.
Consider for example an attacker that would want to send funds from the Vault to their address. They would create a vote with a callscript that does this on success, but on failure it would transfer to e.g. a simple contract that sends funds it was given to his address.
In this scenario, he would receive funds regardless.
from aragon-apps.
Yes, my idea is that this reject callscript could be a state variable of the voting app that gets executed on failure of all votes. This isnt that useful before we can pass parameters/attributes to callscripts (related aragon/aragonOS#166 and aragon/aragonOS#161)
from aragon-apps.
I love your notation @onbjerg
from aragon-apps.
I have a feeling that this might work too. Maybe it could even be generalized as a 'forwarding feedback protocol', in which you can expect a callback with some data after performing a fwd.
Is attachMetadata
only called back to when the vote is created?
PS: Dat Latex
from aragon-apps.
@luisivan thanks man
@izqui Well that's sort of an open issue, as I mentioned in an edit:
If this should work, then how frequently do we call
attachMetadata
? For example, for this to work, the act of voting must also call back (if the caller is a forwarder contract) with the vote ID, which might be super gas intensive.
PS: ye boi
from aragon-apps.
Closing; this is not directly in scope for an additional improvement on top of the current Voting app or aragonOS forwarding structures, and is generally difficult to configure or avoid abuse.
from aragon-apps.
Related Issues (20)
- chore: prefer utilities provided by aragonUI HOT 1
- Voting: update date format HOT 2
- Agent: update help text suggesting Frame HOT 2
- Tokens: App crashes when switching to the last page of DataView
- Finance: Update date format HOT 1
- ARAGON COURT WEBSITE IS DOWN. HOT 2
- Agreement newAction payments HOT 1
- Signing "approve" transaction fails in a Dandelion org using Frame HOT 9
- Finance: Sticky state with deposit when not connected HOT 1
- Move `assertAmountOfRawEvents` to contract helpers repo HOT 3
- TRANSACTION FAILED CREATING DAO. HIGH GAS. HOT 2
- Voting (and possibly others) app does not work HOT 1
- Agent token balances does not show an organizations native token HOT 1
- broken link / survey app not available? HOT 1
- Issue: 'rsync' is not recognized as an internal or external command HOT 1
- Create a vote when tokens transfer occurs HOT 2
- Can't run tests in dev environment HOT 2
- Cannot install a new app to my DAO HOT 2
- command "dao apps <dao-address> --all" not working with argument "--environment aragon:rinkeby" HOT 1
- Update to latest version of solidity HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aragon-apps.