-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Discussion draft: change DB Writer to take value references #13672
Conversation
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.
CI passing and ready for consideration |
cc @hai-rise in case you wanna bench it |
StorageTrieEntry { nibbles, node: node.clone() }, | ||
&StorageTrieEntry { nibbles, node: node.clone() }, |
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.
could this potentially be StorageTrieEntryRef
so that node
is not cloned either?
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.
yeah this will be unlocked by this
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.
lgtm
pending @joshieDo or @rkrasiuk or @shekhirin
fn compress_to_buf<B: bytes::BufMut + AsMut<[u8]>>(&self, buf: &mut B) { | ||
let _ = Compact::to_compact(self, buf); |
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.
yeah this was the reason why we originally had it as self
and Value
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.
lgtm
Includes the following changes:
insert
,upsert
andappend
to take a&T::Value
instead ofT::Value
.StateWriter
to not take ownership of (potentially large?)ExecutionOutcome