-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: Update event indexer and txn indexer to insert txDigest as a hex string #201
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
base: develop
Are you sure you want to change the base?
Conversation
|
👋 faisal-chainlink, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
| if base64Bytes, err := base64.StdEncoding.DecodeString(txDigestHex); err == nil { | ||
| hexTxId := hex.EncodeToString(base64Bytes) | ||
| txDigestHex = "0x" + hexTxId | ||
| } |
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.
should we consider what happens when err is not nil?
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.
or we can safely assume that transactionRecord.Digest is going to be valid
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.
I think we can safely assume it is always there. The thing that I want to check is if the core node currently assumes this to be a base64 string when getting events, if that's the case, we need to make a small change in core as well. cc @stackman27
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.
ok let's wait for his input
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.
Since both fields are expected as bytes, i think decoded hex is better
type Head struct {
Height string
Hash []byte
// Timestamp is in Unix time
Timestamp uint64
}
type Sequence struct {
// This way we can retrieve past/future sequences (EVM log events) very granularly, but still hide the chain detail.
Cursor string
TxHash []byte
Head
Data any
}
No description provided.