-
Notifications
You must be signed in to change notification settings - Fork 715
Add lockup events #2189
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
Merged
Merged
Add lockup events #2189
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1504d80
feat: add lockup events
lgalabru 34854e4
feat: add lockup receipt
lgalabru c540368
chore: cargo fmt
lgalabru 035197a
Merge branch 'master' into feat/lockup-events
lgalabru 13d2958
Merge branch 'feat/atlas-followup' into feat/lockup-events
lgalabru 62d90f0
chore: cargo fmt
lgalabru 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 hidden or 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
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.
So, these are all "synthetic" events -- they don't correspond to a real transaction on the blockchain. This could confuse users and block explorers -- they'll see a txid, but be unable to query it from the chainstate (we've had this problem before in Stacks 1.0 with "synthetic transactions" that achieved the same end).
Would it make sense to add a field in the
StacksTransactionEventstruct to indicate whether or not the event came from a synthetic transaction, so people don't mistakenly believe that these genesis events correspond to on-chain transactions?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.
No need to address it in this PR if you're pressed for time, but please do open an issue for it if you're not going to address it 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.
Also, any insight into how big this list will be in RAM?
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 share the concern about these transactions and events being odd one-offs, however, the event broadcaster attaches these to the initial block in a way that does not require any special handling by the sidecar/explorer. We've already been doing this for a while in order to get the boot contracts exposed in a normalized way.
I can imagine how an
is_syntheticfield could be useful, but I don't think it's worth the effort at the moment.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 a couple of megabytes on disk, not sure about the representation in RAM.
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'm doing some benchmarks on memory usage
Uh oh!
There was an error while loading. Please reload this page.
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.
This PR appears to increase max memory usage from ~580MB to ~700MB. Measured a few times with
time -l stacks-node mocknetand looking at the reportedmaximum resident set size.Tests performed without an event observer configured.
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.
That doesn't sound too bad.
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.
Also of note: with an event observer attached, memory usage is ~2.6GB. The content-size of the first block event payload is ~100MB.