Comments (5)
I've chosen this as the capability to implement next, as it doesn't involve any additional mechanisms except those required for write. By implementing this we can simply test how general the system is.
from cap9.
Each log item can have 0-4 topics. We can use these topics to form a hierarchy of sorts. A log capability can have the following formats:
- 0: The procedure can write to any combination of 0-4 topics.
- 1 [firstTopic]: The procedure must have at least one topic, and the first topic must be "firstTopic".
- 2 [firstTopic. secondTopic]: The procedure must have at least two topics, the first topic must be "firstTopic". and the second topic must be "secondTopic"
- 3: as above but with 3 topics
- 4 [firstTopic, secondTopic, thirdTopic, fourthTopic]: Must have exactly 4 topics exactly as specified.
The format of the capability is currently that the first 32 bytes are the number of topics, and the next 0-4 32-byte values are the topics themselves. This means the capability can be 1, 2, 3, 4, or 5 32-byte values long.
0x0: number of topics, `nTopics` (32 bytes)
0x20: first topic
0x40: second topic
0x60: third topic
0x80: fourth topic
from cap9.
Sounds good.
I imagine we could make the topics smaller (8 bytes each), fit the cap in a single key (32 bytes) and simply use 0x0
as a "empty" marker. This would be more complicated though.
from cap9.
Yes, but then you are also dramatically limiting the use of topics, as topics on the EVM are 32-byte. Probably not worth the small packing gains.
Actually there are a few other instances where we could definitely reduce number sizes where we are currently just using 32-byte words, which I've done for simplicity.
from cap9.
This is currently implemented in #44.
from cap9.
Related Issues (20)
- Procedure#Delete Capability (Ewasm) HOT 1
- Account#Call Capability (Ewasm) HOT 1
- Procedure#Entry Capability (Ewasm) HOT 5
- Handle gas allocation robustly HOT 3
- Restructure modules and factor out serialization/deserialization HOT 4
- Failure of code_copy HOT 1
- Remove test toggle and use a Standard Entry Interface HOT 1
- Storage Capability Std Api HOT 3
- "Getting Started" documentation and CLI HOT 3
- Ewasm CLI - Basic Setup HOT 1
- Ewasm CLI - Development Workflow HOT 1
- Move WASM pre-processing to cap9-cli HOT 1
- Add "Delete Procedure" function to ACL admin proc HOT 1
- CLI - new-procedure command HOT 5
- Make --acl the default HOT 1
- SRML Kernel Interface HOT 1
- Document SRML Interface Study HOT 1
- Provide Basic Cap9 Functionality in the SRML Contracts Module HOT 5
- Basic SRML Module Api HOT 4
- Build Container Image for Cap9
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 cap9.