-
Notifications
You must be signed in to change notification settings - Fork 677
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 cycle-id
ranges to synthetic pox events
#4414
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #4414 +/- ##
==========================================
- Coverage 83.10% 73.15% -9.95%
==========================================
Files 453 453
Lines 327459 328034 +575
Branches 323 323
==========================================
- Hits 272122 239972 -32150
- Misses 55329 88054 +32725
Partials 8 8
... and 225 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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 this looks good, and tests will catch any Clarity errors, right? It would be nice to have tests for these new event keys.
Yes -- the existing |
I took @hstove 's suggestion and chaned The test ensures that the events are emitted without Clarity parsing issues BUT, I am not sure about the values I am asserting against at all - I basically filled those from what was being returned so @zone117x @hstove @kantai please check if those values actually make sense for what was intended here. |
6728855
to
a5d514b
Compare
Thanks for the help with this @8marz8! I'm going to test this in an end-to-end environment because I'm also not totally sure if the cycle ids in the tests are accurate or not. |
a5a2bfb
to
503afd9
Compare
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.
@8marz8 so for the check against Steph's stack-stx
, the assertion is that start-cycle-id
is 22 and end-cycle-id
is 24. Steph made the transaction during 22, with a lock period of 1. So she would start stacking in 23, and end at the start of 24. This might be ok if we said "the user starts stacking in the cycle after start-cycle-id
, but we just need to be consistent with these events. This is also kinda subjective, I'm curious of @zone117x 's thoughts.
Then for the stack-increase
check, both the start and end are 24. When calling stack increase, you don't change your cycles at all, you're just adding more to the existing cycles. So in my opinion, this should match the stack-stx behavior, especially because the tx is made in the same cycle as the stack-stx tx.
This is very close though, nice job!
In this case I think we'd want |
92373f0
to
54651f4
Compare
✅ Updated this PR to match my understanding of what the range queries should achieve from a consumer perspective (be able to use event data for reward/voting-power calculations). I hope I haven't misinterpreted anything 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.
LGTM. Nice improvements and tests @janniks !
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #4413
WIP:
start-cycle-id
to pox eventsend-cycle-id
to pox events