-
Notifications
You must be signed in to change notification settings - Fork 20
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 event logs to stf and db #409
Merged
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8d07413
add events to stf and db tables
ecioppettini 52d58a1
tsconfig.json fixes?
ecioppettini 4b38573
fix some elint errors
ecioppettini 81e1914
emit mqtt events + refactor the api slightly
ecioppettini 639e636
remove unneed eslint exception
ecioppettini 8fac53f
fix type error in generateAppEvents signature
ecioppettini 93af4c2
typed helpers for app events
ecioppettini 2bae7b4
add imported events to the async api endpoint
ecioppettini d616a64
add fields validation in get_logs rest endpoint
ecioppettini 1ca48b3
add 0x prefix to the address stf type
ecioppettini 7924edb
add errors to logs endpoint
ecioppettini 7be63ee
add block range limits to the rest endpoint
ecioppettini 6d815f5
lint in server.ts types
ecioppettini c1ad77a
default to empty events if the file is missing
ecioppettini d6bdfec
undo tsconfig.json reference removal in batcher
ecioppettini efc5b64
lift the field number restriction in get_logs and document the return…
ecioppettini eb526c6
refactor duplicated code in paima-sm
ecioppettini 8634d26
Update packages/paima-sdk/paima-events/src/app-events.ts
ecioppettini ab5edcb
add default for precompiles if the file is missing
ecioppettini 400008e
make toBlock optional in rest endpoint
ecioppettini b92aa1b
include signatureHash for appEvents in mqtt path
ecioppettini 34ad38e
add index for topic row in event table
ecioppettini 9b32dee
refactor the types and add some helpers
ecioppettini 9c1a4ae
remove package.json dependency that is in tsconfig
ecioppettini d8a3069
lowercase field name in index's name
ecioppettini 63bb369
refactor the signature of encodeEventForStf
ecioppettini 3fe80ae
rename idx field to logIndex
ecioppettini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's probably not clear from the name that this is meant to represent the order in which this log was executed within the transaction
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 renamed it to
logIndex
. Only caveat is that if we wrap this to implementeth_getLogs
, we need to remember that this is the index of the log in the tx, and the other one is the index of the log in the block. I guess we may be able to compute the index of the log out of the tx index and the log index though?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 maybe we may want to change this field to be the log index in the block to be consistent with that? I just used the index in the tx because it's what was described in #373
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.
ah good catch. I feel it should probably by the index in the block instead of in the transaction then