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

Use new version of PeerNet with the stream_limiter set #4193

Merged
merged 7 commits into from
Jul 3, 2023

Conversation

litchipi
Copy link
Contributor

@litchipi litchipi commented Jul 3, 2023

Uses the changes from massalabs/PeerNet#55 inside the massa_protocol_{worker,exports}

  • document all added functions
  • try in sandbox /simulation/labnet
  • unit tests on the added/changed features
    • make tests compile
    • make tests pass
  • add logs allowing easy debugging in case the changes caused problems
  • if the API has changed, update the API specification

@litchipi litchipi requested review from modship and Leo-Besancon July 3, 2023 13:03
@litchipi litchipi changed the base branch from main to testnet_24 July 3, 2023 13:03
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
litchipi added 2 commits July 3, 2023 15:07
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
@litchipi litchipi force-pushed the stream_limiter_test branch from 7234779 to 040ca91 Compare July 3, 2023 13:09
Copy link
Collaborator

@Leo-Besancon Leo-Besancon left a comment

Choose a reason for hiding this comment

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

Congrats!

@litchipi
Copy link
Contributor Author

litchipi commented Jul 3, 2023

Just tested on the labnet with the final Peernet version, everything is fine.

Right now there's something wrong with massa_bootstrap, apparently it's going too quickly even if the rate is limited

AurelienFT and others added 2 commits July 3, 2023 15:42
@litchipi
Copy link
Contributor Author

litchipi commented Jul 3, 2023

I just fixed tests in massa-bootstrap. Because some Limiter were created in advance, they had the time to stack a bit of tokens before the read, so it took less time than it was expected.
To solve this, I added a std::thread::sleep to stack to the maximum the Limiters, then assert they take longer than expected (but lower the expectation as we stacked up)

litchipi added 2 commits July 3, 2023 15:51
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
@litchipi litchipi merged commit b080ed1 into testnet_24 Jul 3, 2023
@AurelienFT AurelienFT deleted the stream_limiter_test branch October 23, 2023 08:48
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.

3 participants