-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add StateUpdate payload #345
base: master
Are you sure you want to change the base?
Conversation
|
||
findflag := false | ||
for k := 0; k < len(stateUpdater); k++ { | ||
log.Trace(fmt.Sprintf("StateUpdate updaterPublickey %d: %x %x", k, stateUpdater[k].X, stateUpdater[k].Y)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Tracef, Debugf, Warnf... method instead. see #332 for more details.
// stateKey | ||
statePrefix := []byte{byte(ST_STATES)} | ||
stateKey := append(statePrefix, namespace...) | ||
stateKey = append(stateKey, key...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this desgin may have problem since we can not figure out namespace and key from the stateKey.
case: namespace: dna
, key: node3
, and namespace:dnanode
, key:3
will share the same underlying data。
recommendation: Use len(namespace) + namespace + key schema to construct the stateKey
approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest verify in user specify branch before official be merged into main branch
this payload already verified in user case. |
support store a value use Namespace and key as index. Signed-off-by: zhengq1 <[email protected]> (cherry picked from commit 5223bd3) Signed-off-by: zhengq1 <[email protected]>
support store a value use Namespace and key as index.
Signed-off-by: zhengq1 [email protected]