-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Don't store RLPs in valueNodes (except tests). #170
Conversation
e408ff6
to
62aa4f0
Compare
62aa4f0
to
00074e0
Compare
@@ -182,7 +182,8 @@ func TestSerialiseBlockWitness(t *testing.T) { | |||
if err := bwb.WriteTo(&b); err != nil { | |||
t.Errorf("Could not make block witness: %v", err) | |||
} | |||
expected := common.FromHex("0xa76862616c616e6365730065636f64657300666861736865731822646b65797300666e6f6e63657300697374727563747572650b6676616c75657300582023181a62d35fe01562158be610f84e047f99f5e74d896da21682d925964ece3a0601024704010402040304") | |||
|
|||
expected := common.FromHex("0xa76862616c616e6365730065636f64657300666861736865731822646b65797300666e6f6e63657300697374727563747572650b6676616c756573005820858f70a4b1e6aa71a7edc574d2ca946495a038aa37ce13dc7b7ed15661a6ff2f0601024704010402040304") |
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.
Why did this value change?
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.
we no longer treat []byte("val1")
and []byte("val2")
in tr.Update(...)
calls (lines 174-175) as RLP-encoded values, so we add a double prefix to them when hashing, so they produce different hash values.
} else if l < 56 { | ||
buffer[pos] = byte(183 + 1) | ||
pos++ | ||
buffer[pos] = byte(l + 1) |
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.
What is 183? Could you clarify it?
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.
will clarify in #171 if you don't mind :)
Next() (common.Hash, error) | ||
} | ||
|
||
// FIXME: comments here |
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.
Do you want separate PR for it?
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.
yep, will do in #171
* transition data * Update tables.go
fixes: #126