Replies: 2 comments 5 replies
-
can you explain how this maps to the idea of a system moving through a set of states? |
Beta Was this translation helpful? Give feedback.
-
The idea is very interesting. I'm curious on that:
Why did you say that the input space is given by "configurations of a voting module"? At a first read of the paper you cited I would imagine that:
Have you thought about how to implement an equilibrium state for a test? |
Beta Was this translation helpful? Give feedback.
-
in Zargham and Shorish's Generalized Dynamical Systems, systems are modeled as having a set of admissible inputs at any step in their evolution. given the ability to determine all of the admissible input for a system at a given step, and information about the state transition process of the system, one can then extrapolate what the possible next states of the system are by simulating all admissible inputs.
what i propose here is that for smart contracts, this admissible input space may be considered to be the interface that they implement. for example, for a DAO DAO voting module, a trait to describe its interface might look like:
in this example, the admissible input space is all configurations of a voting module wherein this interface is satisfied.
given an implementation of this interface for each voting module, one might write a simple test:
the moment that we construct
DAO::with_propose_module
, the testing framework knows that the tester does not care about the specifics of any module other than the proposal module:me
. the critical observation is that the configuration of the voting module used can be completely randomized.constraining the DAO based on the interfaces that it must implement, and then randomizing the actual configuration within those constraints lets us gradually fuzz the admissible input space of the DAO as this test gets run.
to integrate this in the type system, we extend the voting module interface with an additional method that gives a randomly configured version of the voting module:
the test framework then first selects a random voting module to use with the test, and then creates a randomly configured version of the module to be used in the test. a random seed makes this process reproducible.
beyond DAO DAO
what is described here is not voting module, nor is it DAO DAO specific. the general formalism here is:
this is applicable to any smart contract system with well-defined interfaces.
Beta Was this translation helpful? Give feedback.
All reactions