-
Notifications
You must be signed in to change notification settings - Fork 213
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
feat(otterscan): add ots slim block and serialze OperationType to int #1043
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.
awesome, tysm for all of these
one nit
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
… int" This reverts commit 96df6f4. Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
4ddc7cf
to
80d596d
Compare
where | ||
S: Serializer, | ||
{ | ||
serializer.serialize_u8(*self as u8) |
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.
so this is actually a number and not a string?
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.
…alloy-rs#1043) * fix(otterscan): add OtsSlimBlock for BlockDetails Signed-off-by: jsvisa <delweng@gmail.com> * feat(otterscan): use serde_repr to serialize OperationType to int Signed-off-by: jsvisa <delweng@gmail.com> * feat(otterscan): add a new function for BlockDetails Signed-off-by: jsvisa <delweng@gmail.com> * Revert "feat(otterscan): use serde_repr to serialize OperationType to int" This reverts commit 96df6f4. Signed-off-by: jsvisa <delweng@gmail.com> * feat(otterscan): custom implement Serialize for OperationType Signed-off-by: jsvisa <delweng@gmail.com> * (de)serialize to u8 Signed-off-by: jsvisa <delweng@gmail.com> * clippy Signed-off-by: jsvisa <delweng@gmail.com> --------- Signed-off-by: jsvisa <delweng@gmail.com>
…alloy-rs#1043) * fix(otterscan): add OtsSlimBlock for BlockDetails Signed-off-by: jsvisa <delweng@gmail.com> * feat(otterscan): use serde_repr to serialize OperationType to int Signed-off-by: jsvisa <delweng@gmail.com> * feat(otterscan): add a new function for BlockDetails Signed-off-by: jsvisa <delweng@gmail.com> * Revert "feat(otterscan): use serde_repr to serialize OperationType to int" This reverts commit 96df6f4. Signed-off-by: jsvisa <delweng@gmail.com> * feat(otterscan): custom implement Serialize for OperationType Signed-off-by: jsvisa <delweng@gmail.com> * (de)serialize to u8 Signed-off-by: jsvisa <delweng@gmail.com> * clippy Signed-off-by: jsvisa <delweng@gmail.com> --------- Signed-off-by: jsvisa <delweng@gmail.com>
Motivation
I'm running reth along with otterscan, and find some more rpc mismatches:
ots_getInternalOperations
returnstype
as int, but the default serde json serialize will return as String instead, useserde_repr
to serialize it;ots_getBlockDetails
without transactions, https://github.com/otterscan/otterscan/blob/3adcc62c4eedc56f812fab5ca4b85e3c5fd4b595/docs/custom-jsonrpc.md#L76 https://github.com/ledgerwatch/erigon/blob/6097c05cc914801132e7897427956f196efbbba1/turbo/jsonrpc/otterscan_api.go#L259-L261issuance
andtotal_fees
forBlockDetails
After this prototypes changed, I think reth can almost run along with otterscan(without the transaction before/after listing and ots2 API)
Solution
PR Checklist