8000 Update spacemesh API by fasmat · Pull Request #189 · spacemeshos/poet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update spacemesh API #189

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 2 commits into from
Dec 15, 2022
Merged

Update spacemesh API #189

merged 2 commits into from
Dec 15, 2022

Conversation

fasmat
Copy link
Member
@fasmat fasmat commented Dec 14, 2022

Update poet with the latest spacemesh API

@fasmat fasmat self-assigned this Dec 14, 2022
@fasmat
Copy link
Member Author
fasmat commented Dec 14, 2022

@poszu the unit tests on windows are very unstable. I executed them 4 times and got different errors every time:

  • db file is used by another process
  • file seeking fails due to EOF
  • when asserting the round ID it is already 2 when it should be 1
  • after recovery there are no executing rounds when there should be one

I reverted the last merge in this PR, so that we can get a green build again.

@fasmat fasmat requested a review from pigmej December 14, 2022 11:25
This reverts commit f81f209, reversing
changes made to 8cb3c7d.
@poszu
Copy link
Contributor
poszu commented Dec 15, 2022

@poszu the unit tests on windows are very unstable. I executed them 4 times and got different errors every time:

I am aware of these issues with Mac and Windows. Unfortunately, the tests were written with some timing assumptions in mind and:

  • the mac runner is slow,
  • time on windows has low res.
  • db file is used by another process

This is caused by asynchronous round teardown. I plan to fix it in #181.

  • file seeking fails due to EOF

This is caused by generating empty proofs (0 leaves) - it happens on Mac as it is slow and the round is ended the moment it starts. I don't have a clear idea of how to fix it. Perhaps an empty proof is a valid one and it should be broadcasted empty instead of trying to build leaves and nodes?

  • when asserting the round ID it is already 2 when it should be 1
  • after recovery there are no executing rounds when there should be one

It's tracked in #185.

I reverted the last merge in this PR, so that we can get a green build again.

These issues are not directly related to the PR you revert. Reverting doesn't fix the problem, it will persist, perhaps a little less often though. I'm against reverting it.

I'd rather stop running tests on mac and windows as they are not the platform that Poets will run on. There's no point in supporting them.

@poszu
Copy link
Contributor 8000
poszu commented Dec 15, 2022

Why is it needed to update api repo now? Poet only uses the Gateway Service and it's unchanged between v1.5.2 and v1.5.3.

@fasmat
Copy link
Member Author
fasmat commented Dec 15, 2022

These issues are not directly related to the PR you revert. Reverting doesn't fix the problem, it will persist, perhaps a little less often though. I'm against reverting it.

That might very well be the case but at the moment develop has a red build, and the PR I reverted caused it to become red: https://github.com/spacemeshos/poet/actions/runs/3684903021
This blocks other PRs like this one, that's why I reverted it.

I'd rather stop running tests on mac and windows as they are not the platform that Poets will run on. There's no point in supporting them.

I'm against this. Poet is a dependency (as a library not just as a service) of go-spacemesh. go-spacemesh needs to support all 3 platforms, so poet should also be tested for all three. We can maybe skip some of the tests on mac and windows if they are only needed for the service but not for the functionality that go-spacemesh uses.

I'd rather stop running tests in parallel if this is unstable until the issues listed above (which seem to be already tracked) are resolved. After that they can be enabled again. The PR that introduced the parallel tests was just unlucky to have a single green build, you can try re-running the CI on the PR and it will fail more often then pass - imo the PR should not have been merged at the current state.

Why is it needed to update api repo now? Poet only uses the Gateway Service and it's unchanged between v1.5.2 and v1.5.3.

I initially thought it is required to update the API to v1.5.3 because I had poet related issues in the systests related to a PR I'm trying to merge, but the issue isn't Poet; it's unstable tests. Updating the API isn't required at the moment, but it also shouldn't hurt to do so.

@poszu
Copy link
Contributor
poszu commented Dec 15, 2022

These issues are not directly related to the PR you revert. Reverting doesn't fix the problem, it will persist, perhaps a little less often though. I'm against reverting it.

That might very well be the case but at the moment develop has a red build, and the PR I reverted caused it to become red: https://github.com/spacemeshos/poet/actions/runs/3684903021
This blocks other PRs like this one, that's why I reverted it.

Again, the failures are not caused by running tests in parallel. Tests are flaky nevertheless and the build will continue to fail even after it's reverted. Running tests in parallel is not unstable. The tests are unstable in general.

I'd rather stop running tests on mac and windows as they are not the platform that Poets will run on. There's no point in supporting them.

I'm against this. Poet is a dependency (as a library not just as a service) of go-spacemesh. go-spacemesh needs to support all 3 platforms, so poet should also be tested for all three. We can maybe skip some of the tests on mac and windows if they are only needed for the service but not for the functionality that go-spacemesh uses.

IMHO, the Poet should not be a dependency of go-spacemesh as a whole or even at all. It's used in two places only:

  • unit tests use the integration harness. The poet could (and I think it should) be instead run in a docker container. Alternatively, integration tests could be left for systests.
  • to verify proof validity using verifier.Validate(). I think that this could be inlined in the go-spacemesh repo. If we were to run tests on mac and win selectively, then only these tests need to be run: poet/verifier/verifier_test.go.

@fasmat
Copy link
Member Author
fasmat commented Dec 15, 2022

Again, the failures are not caused by running tests in parallel. Tests are flaky nevertheless and the build will continue to fail even after it's reverted. Running tests in parallel is not unstable. The tests are unstable in general.

Yes, but running them in parallel causes them more often to fail. The build is red, reverting the PR makes the build green. Shall we now not merge any PRs until the issues are resolved?

IMHO, the Poet should not be a dependency of go-spacemesh as a whole or even at all. It's used in two places only:

This is not the case yet; poet is used on all 3 platforms at the moment. Removing the tests is better than leaving them and just making it less likely that they randomly fail?

@poszu
Copy link
Contributor
poszu commented Dec 15, 2022

The build is red, reverting the PR makes the build green.

IMO it was luck.

@poszu poszu merged commit 4a0d2b1 into develop Dec 15, 2022
@poszu poszu deleted the update-spacemesh-api branch December 15, 2022 11:32
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.

2 participants
0