Skip to content
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 by Bors] - Improve visibility around poet registrations in events #6382

Closed
wants to merge 4 commits into from

Conversation

jellonek
Copy link
Contributor

@jellonek jellonek commented Oct 9, 2024

Closes #5565

Motivation

Provide new events for:

  • created poet client (URL)
  • registered in poet (URL, challenge, round)
  • got proof from poet (URL, round, ticks)
  • selected best poet proof (URL, round, ticks)

Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

TODO

@jellonek jellonek force-pushed the events/poet branch 2 times, most recently from 5d7294a to 8706d4a Compare October 10, 2024 10:39
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.7%. Comparing base (58b0c6c) to head (bbca1a6).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #6382    +/-   ##
========================================
  Coverage     79.7%   79.7%            
========================================
  Files          328     328            
  Lines        42771   42866    +95     
========================================
+ Hits         34093   34196   +103     
+ Misses        6746    6740     -6     
+ Partials      1932    1930     -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jellonek jellonek force-pushed the events/poet branch 6 times, most recently from c0a6e95 to c19dc73 Compare October 14, 2024 09:58
@jellonek jellonek marked this pull request as ready for review October 14, 2024 10:57
events/events.go Outdated Show resolved Hide resolved
activation/poet.go Outdated Show resolved Hide resolved
events/events.go Outdated Show resolved Hide resolved
events/events.go Outdated Show resolved Hide resolved
events/events.go Outdated
Comment on lines 147 to 149
Current: current.Uint32(),
Publish: publish.Uint32(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: current epoch is arguably not that interesting, but the publish epoch of the ATX and maybe the target epoch (always publish epoch + 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi: it's old EmitPoetWaitProof event only renamed.
Changing these fields may require more work to adapt any automation which is already dependent on these events.

Maybe someone could spent quarter of an hour to look on all events and what could be improved, so i could include all these changes in this PR?
@poszu @ivan4th @fasmat WDYT?

Copy link
Member

@fasmat fasmat Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment these equalities always hold true, since they is hardcoded:

current + 1 = publish
publish + 1 = target

However the first line doesn't need to be true - theoretically a PoET can run for longer than one epoch, the protocol would allow it. Only the second line is given by the protocol; the target epoch is always one after the publish epoch.

To know the current epoch one can just calculate it based on when that event was emitted and the time of genesis, but the publish epoch is the interesting data - in which epoch are we planning to publish the ATX we are building (and arguably which epoch are we targeting with it).

I'm not insisting on that change, since we don't support PoETs longer than one epoch yet anyway 🙂

activation/poet_client_test.go Outdated Show resolved Hide resolved
activation/nipost.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@jellonek jellonek force-pushed the events/poet branch 2 times, most recently from 5b9058c to 505031a Compare October 17, 2024 10:29
@jellonek
Copy link
Contributor Author

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Oct 17, 2024
Closes #5565

## Motivation

Provide new events for:

- created poet client (URL)
- registered in poet (URL, challenge, round)
- got proof from poet (URL, round, ticks)
- selected best poet proof (URL, round, ticks)

## Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

## TODO

- [ ] Requires spacemeshos/api#382 than bump in that module version
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [ ] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Build failed:

@jellonek
Copy link
Contributor Author

bors try

@spacemesh-bors
Copy link

Build failed:

@jellonek
Copy link
Contributor Author

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Oct 18, 2024
Closes #5565

## Motivation

Provide new events for:

- created poet client (URL)
- registered in poet (URL, challenge, round)
- got proof from poet (URL, round, ticks)
- selected best poet proof (URL, round, ticks)

## Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

## TODO

- [x] Requires spacemeshos/api#382 than bump in that module version
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [ ] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Build failed:

@jellonek
Copy link
Contributor Author

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Oct 18, 2024
Closes #5565

## Motivation

Provide new events for:

- created poet client (URL)
- registered in poet (URL, challenge, round)
- got proof from poet (URL, round, ticks)
- selected best poet proof (URL, round, ticks)

## Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

## TODO

- [x] Requires spacemeshos/api#382 than bump in that module version
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [ ] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Build failed:

@jellonek
Copy link
Contributor Author

bors merge

@spacemesh-bors
Copy link

Canceled.

@jellonek
Copy link
Contributor Author

bors merge

@spacemesh-bors
Copy link

Merge conflict.

@jellonek
Copy link
Contributor Author

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Oct 18, 2024
Closes #5565

## Motivation

Provide new events for:

- created poet client (URL)
- registered in poet (URL, challenge, round)
- got proof from poet (URL, round, ticks)
- selected best poet proof (URL, round, ticks)

## Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

## TODO

- [x] Requires spacemeshos/api#382 than bump in that module version
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [ ] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Build failed:

  • systest-status

@fasmat
Copy link
Member

fasmat commented Oct 18, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Oct 18, 2024
Closes #5565

## Motivation

Provide new events for:

- created poet client (URL)
- registered in poet (URL, challenge, round)
- got proof from poet (URL, round, ticks)
- selected best poet proof (URL, round, ticks)

## Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

## TODO

- [x] Requires spacemeshos/api#382 than bump in that module version
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [ ] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Build failed (retrying...):

spacemesh-bors bot pushed a commit that referenced this pull request Oct 18, 2024
Closes #5565

## Motivation

Provide new events for:

- created poet client (URL)
- registered in poet (URL, challenge, round)
- got proof from poet (URL, round, ticks)
- selected best poet proof (URL, round, ticks)

## Test Plan

New functionality tested as a part of node/node_test and activation/nipost_test.

## TODO

- [x] Requires spacemeshos/api#382 than bump in that module version
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [ ] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
@spacemesh-bors
Copy link

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title Improve visibility around poet registrations in events [Merged by Bors] - Improve visibility around poet registrations in events Oct 18, 2024
@spacemesh-bors spacemesh-bors bot closed this Oct 18, 2024
@spacemesh-bors spacemesh-bors bot deleted the events/poet branch October 18, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve visibility around poet registrations in events
3 participants