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

Add tests and rename handler and data #4421

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Add tests and rename handler and data #4421

merged 2 commits into from
Oct 3, 2023

Conversation

AurelienFT
Copy link
Contributor

@AurelienFT AurelienFT commented Sep 21, 2023

Important description

This PR improves readability of the AsyncMessage structure, fix potential panics.

Details :

  • Fix potential panic behaviour : Denom value of 0 was accepted in deserialisation
  • Fix problem function name in async message could be only u8::MAX size but the limit of length function is u16::MAX
  • Unify data limits of async message that represent the parameters of the function call with the limits of parameters of a normal call. The values was differents.
  • Wrong limit used for handler name in SetOrKeep serialisation
  • Renamed handler -> function
  • Renamed Data - > functions params
  • Remove from bootstrap async pool variables unused
  • Change excluded to included in max size of trigger datastore key to match the behaviour of the ledger datastore key limit

Follow up that needs to be done

In GRPC :

  • Rename handler -> function
  • Rename data -> function params

On a more general note, I think we should make a changelog for the mainnet so that we could add breaking changes (but useful to be done now otherwise it will be a bigger mess) like this change and #4409 for example. @Leo-Besancon and @damip I let you decide on that.

The messages.rs file now have 90% of line coverage and all min/max limit on serializer/deserializer are tested

@damip
Copy link
Member

damip commented Sep 21, 2023

Very good work @AurelienFT ! Reviewing it

@AurelienFT AurelienFT mentioned this pull request Sep 21, 2023
8 tasks
massa-async-pool/src/config.rs Outdated Show resolved Hide resolved
massa-async-pool/src/lib.rs Outdated Show resolved Hide resolved
massa-async-pool/src/message.rs Outdated Show resolved Hide resolved
massa-async-pool/src/pool.rs Show resolved Hide resolved
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.

Thanks for the small corrections, everything looks good!

@AurelienFT
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 3, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

  • build

@bors bors bot merged commit e6b90eb into main Oct 3, 2023
@AurelienFT AurelienFT deleted the tests_async_pool branch October 23, 2023 08:51
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