Comments (3)
Updating this issue.
Now that SIMPs exist, we do have the "contract controller" framework, sort of.
This issue should now be considered "Define SIMP for analysis and testing"
from sapio.
What do you mean here by saying "SIMP for analysis and testing". Are these hints that tell the test framework how to drive the contract? Can that not be inferred from the ABI without SIMPs? Am I misunderstanding the issue?
from sapio.
it's a bit different. A basic example is if you have a SIMP ProveAvailableForNBlocksBefore(Target, u64)
and a SIMP Target(&'static str)
.
You lable one template as ProveAvailableForNBlocksBefore(Target("counter_spend"), 10)
and a another as Target("counter_spend")
Then, while testing, you could parse the contract for the ProveAvailableForNBlocksBefore and Target labels and try to constraint solve to check that the first template has a 10 block lead on the other.
Obviously, you can get really in the weeds on designing these types of attributes, as well as a test runner environment that can automate checking these properties, but right now contracts are barely testable at all, so basic testing hooks would really help.
These do differ from normal runtime things because you might include all sorts of stuff in them including labels for e.g. specific test scenarios (e.g., TestPoint(Scenarion(String), Box)), which can then be used for things like "Assume this transaction has been reached, then show that...".
Sorry if that's a bit vague, but this is a wide problem space.
from sapio.
Related Issues (20)
- Replace serde-json with a canoncial json library which can support floats? HOT 5
- simplify amount_range / Amount* structs to a sane default? HOT 5
- Make bind_psbt function use SIMPs, not mock outputs, for adding inputs HOT 6
- no_std support for sapio modules? HOT 2
- take advantage of new workspace hierarchies to split out "sapio core" workspace from host stuff HOT 2
- reproducible builds for WASM modules
- Consistent & Clear terminology clean up
- Defining "Packages" / "Bundles"
- Redefine the core module return type to flatten/deduplicate some data
- Fix broken CI
- Revert removal of cross module validation
- Add Emulation for other Covenant Primitives? HOT 2
- Test max contract depths/recursion limits, potentially "flatten" computations.
- Stop Directly Constructing Policy AST HOT 5
- macros and inferred types
- Context/Template type parameter?
- Avoid Feature Flags unless absolutely required
- Rework sapio-contrib & examples
- Runnable Examples in Book
- Any plans for supporting ordinals? 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 sapio.