Comments (4)
This seems to happen also inside the handleMsgLike
:
like := types.Like{
ID: xid.New().String(),
}
And inside handleMsgCreateSession
session := types.Session{
ID: xid.New().String(),
}
from desmos.
Why you think this ID should be deterministic?
from desmos.
@kwunyeung Let's consider the situation in which we have two different nodes, A and B.
The TX is processed by both nodes to update their respective statuses. While processing the MsgCreatePost message, this happens:
- on node A, the new post's ID assumes value X
- on node B, the new post's ID assumes value Y
After creating the post, the client then asks to both nodes for the list of all posts. What will he get are two different lists:
- from node A he will get a list containing a post with ID X
- from node B he will get a list containing a post with ID Y
What ID should it use when liking the post now? Should it use X or Y?
This obviously gets more and more complicated as new nodes are taken into consideration.
As far as I've understood the Handler is called on each node to update the local status, and thus the handler behavior should be 100% deterministic to make sure each node has the same status at each given point in time.
With this random ID generation we cannot guarantee it and thus we might run into conflicting statuses problems later in time.
from desmos.
Oops! My bad. Yes it has to be deterministic. Let's change it to an incremental ID like proposal ID and sequence before we get a solution on verifiable random number.
from desmos.
Related Issues (20)
- shasum -a 256 in doc
- Mutation test
- Mutation test
- Mutation test HOT 1
- Mutation test HOT 1
- Mutation test HOT 1
- Mutation test HOT 1
- Desmos v4.0.0
- Support more signature algorithm and specifications inside chain links proofs
- Update ibc-go to v3.0.0
- Update wasmd to 0.27.0
- This is a test for Jira: DCD-1
- Add the possibility of reacting to posts
- Improve `x/posts` structures names HOT 3
- Check Cosmos Proto annotation
- Support x/authz
- Index out of range when querying poll answers from CLI
- Improve the posts queries to enable query posts by user HOT 4
- Update cosmos/cosmos-sdk to v0.46 HOT 1
- Add a comment-specific permission
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 desmos.