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 versioninig key & value checks #4552

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

sydhds
Copy link
Contributor

@sydhds sydhds commented Nov 21, 2023

  • document all added functions
  • try in sandbox /simulation/labnet
    • if part of node-launch, checked using the resync_check flag
  • 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

@sydhds sydhds linked an issue Nov 21, 2023 that may be closed by this pull request
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (06f83d8) 72.55% compared to head (05afdc0) 72.55%.
Report is 2 commits behind head on main.

Files Patch % Lines
massa-versioning/src/versioning.rs 94.54% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4552   +/-   ##
=======================================
  Coverage   72.55%   72.55%           
=======================================
  Files         288      288           
  Lines       50874    50874           
=======================================
  Hits        36910    36910           
  Misses      13964    13964           

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

Copy link
Contributor

@bilboquet bilboquet left a comment

Choose a reason for hiding this comment

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

Last opened discussion is not critical (feel free to close it).
So I approve.

Copy link
Contributor

@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.

LGTM!

@Leo-Besancon Leo-Besancon changed the base branch from main to pre_mainnet November 22, 2023 08:36
@sydhds sydhds merged commit bc7d554 into pre_mainnet Nov 22, 2023
13 checks passed
@sydhds sydhds deleted the feature/versioning_key_value_valid_2 branch November 22, 2023 08:39
Leo-Besancon pushed a commit that referenced this pull request Nov 27, 2023
* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>
damip pushed a commit that referenced this pull request Nov 27, 2023
* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

---------

Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
Leo-Besancon added a commit that referenced this pull request Nov 27, 2023
* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

---------

Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
Leo-Besancon pushed a commit that referenced this pull request Nov 28, 2023
* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* Add array indexing listing tool

* Remove array indexing in denunciation code

* Remove more array indexing

* Add more exclude patterns

* Use nom take

---------

Co-authored-by: sydhds <sydhds@gmail.com>
damip pushed a commit that referenced this pull request Nov 28, 2023
* Update version & CI

* Test/array indexing checkup 1 (#4560)

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* Add array indexing listing tool

* Remove array indexing in denunciation code

* Remove more array indexing

* Add more exclude patterns

* Use nom take

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* fix: cross os checksums

* Revert "Test/array indexing checkup 1 (#4560)"

This reverts commit 7efca19.

* Revert "Update version & CI"

This reverts commit 77f33a0.

---------

Co-authored-by: Leo-Besancon <lb@massa.net>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
damip pushed a commit that referenced this pull request Nov 28, 2023
* Buildnet WIP

* Mock Final State/Improve tests execution (#4512)

* Use a controller for final state to be able to mock it

* Fix all formatting issues.

* Use more mocks in execution tests

* Fix test nested call usage

* improve some tests execution

* Fix tests async message and compact the test of executed

* Fix more execution tests

* Fix more tests.

* Update more tests

* Finish fixing all executions tests.

* Improve naming

* add more comment

* Fix comment

* update test to check spend coins with readonly

* add coins

* check coins on rollbuy

* clippy

* update roll_buy

* delete helloworld wasm

* update test_readonly_execution

* fix tests merge

* fix test test_readonly_execution

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* add test for cancel_async_msg

* clippy

* cancel async msg check refound sender

---------

Co-authored-by: Leo-Besancon <lb@massa.net>
Co-authored-by: AurelienFT <32803821+AurelienFT@users.noreply.github.com>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
damip added a commit that referenced this pull request Nov 30, 2023
* Update version & CI

* Test/array indexing checkup 1 (#4560)

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* Add array indexing listing tool

* Remove array indexing in denunciation code

* Remove more array indexing

* Add more exclude patterns

* Use nom take

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Fails in send_operations if get_gas_usage() > max_gas_per_block

Returning a distinct error message for ExecuteSC and CallSC operations.

Signed-off-by: Jean-François <jfm@laposte.net>

* coins spending tests (#4532)

* Buildnet WIP

* Mock Final State/Improve tests execution (#4512)

* Use a controller for final state to be able to mock it

* Fix all formatting issues.

* Use more mocks in execution tests

* Fix test nested call usage

* improve some tests execution

* Fix tests async message and compact the test of executed

* Fix more execution tests

* Fix more tests.

* Update more tests

* Finish fixing all executions tests.

* Improve naming

* add more comment

* Fix comment

* update test to check spend coins with readonly

* add coins

* check coins on rollbuy

* clippy

* update roll_buy

* delete helloworld wasm

* update test_readonly_execution

* fix tests merge

* fix test test_readonly_execution

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* add test for cancel_async_msg

* clippy

* cancel async msg check refound sender

---------

Co-authored-by: Leo-Besancon <lb@massa.net>
Co-authored-by: AurelienFT <32803821+AurelienFT@users.noreply.github.com>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>

* improve errors (#4567)

* tech(async_msg) : check if the target address exist

* tech(call_sc) : add check target address to call_sc_op

* check target sc address on init_call

* check target address in read only call

* fix unit tests

* remove dbg macro

* Update massa-execution-worker/src/context.rs

Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>

---------

Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>

* Fix tests (#4568)

* Fix CI WIP (#4569)

* Fix ws_disabled() test on windows

* fix bootstrap server port

* Fix CI local Leo

* Update scenarios_mandatories.rs

* Add CI profile argument to nextest

---------

Co-authored-by: modship <yeskinokay@gmail.com>

* Fix test + Update lcov.info

* Add codecov.yml

* fix internal error serde (#4570)

* Release prebuilt profile (#4572)

* codegen-units set to 1 for prebuilt binaries

* Update toolchain version in CI & CD

* Update CI & Genesis

---------

Signed-off-by: Jean-François <jfm@laposte.net>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
Co-authored-by: Jean-François <jfm@laposte.net>
Co-authored-by: Modship <yeskinokay@gmail.com>
Co-authored-by: AurelienFT <32803821+AurelienFT@users.noreply.github.com>
Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
Leo-Besancon added a commit that referenced this pull request Nov 30, 2023
* Update version & CI

* Test/array indexing checkup 1 (#4560)

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* Add array indexing listing tool

* Remove array indexing in denunciation code

* Remove more array indexing

* Add more exclude patterns

* Use nom take

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* fix: cross os checksums

* Revert "Test/array indexing checkup 1 (#4560)"

This reverts commit 7efca19.

* Revert "Update version & CI"

This reverts commit 77f33a0.

---------

Co-authored-by: Leo-Besancon <lb@massa.net>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
Leo-Besancon added a commit that referenced this pull request Nov 30, 2023
* Update version & CI

* Test/array indexing checkup 1 (#4560)

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* Add array indexing listing tool

* Remove array indexing in denunciation code

* Remove more array indexing

* Add more exclude patterns

* Use nom take

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Fails in send_operations if get_gas_usage() > max_gas_per_block

Returning a distinct error message for ExecuteSC and CallSC operations.

Signed-off-by: Jean-François <jfm@laposte.net>

* coins spending tests (#4532)

* Buildnet WIP

* Mock Final State/Improve tests execution (#4512)

* Use a controller for final state to be able to mock it

* Fix all formatting issues.

* Use more mocks in execution tests

* Fix test nested call usage

* improve some tests execution

* Fix tests async message and compact the test of executed

* Fix more execution tests

* Fix more tests.

* Update more tests

* Finish fixing all executions tests.

* Improve naming

* add more comment

* Fix comment

* update test to check spend coins with readonly

* add coins

* check coins on rollbuy

* clippy

* update roll_buy

* delete helloworld wasm

* update test_readonly_execution

* fix tests merge

* fix test test_readonly_execution

* Update ci.yml

* Feature/feature/versioning ser der harden 2 (#4554)

* Add some unit tests for versioning deserialization to the limits

* Clippy pass

* Better error message

* Minor fixes

* Excluded -> Included

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Add versioninig key & value checks (#4552)

* Add versioninig key & value checks

* Improve error message when no prefix

---------

Co-authored-by: sydhds <sydhds@gmail.com>

* Update CI, Version and genesis timestamp

* add test for cancel_async_msg

* clippy

* cancel async msg check refound sender

---------

Co-authored-by: Leo-Besancon <lb@massa.net>
Co-authored-by: AurelienFT <32803821+AurelienFT@users.noreply.github.com>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>

* improve errors (#4567)

* tech(async_msg) : check if the target address exist

* tech(call_sc) : add check target address to call_sc_op

* check target sc address on init_call

* check target address in read only call

* fix unit tests

* remove dbg macro

* Update massa-execution-worker/src/context.rs

Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>

---------

Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>

* Fix tests (#4568)

* Fix CI WIP (#4569)

* Fix ws_disabled() test on windows

* fix bootstrap server port

* Fix CI local Leo

* Update scenarios_mandatories.rs

* Add CI profile argument to nextest

---------

Co-authored-by: modship <yeskinokay@gmail.com>

* Fix test + Update lcov.info

* Add codecov.yml

* fix internal error serde (#4570)

* Release prebuilt profile (#4572)

* codegen-units set to 1 for prebuilt binaries

* Update toolchain version in CI & CD

* Update CI & Genesis

---------

Signed-off-by: Jean-François <jfm@laposte.net>
Co-authored-by: Sydhds <sylvain.delhomme@gmail.com>
Co-authored-by: sydhds <sydhds@gmail.com>
Co-authored-by: Jean-François <jfm@laposte.net>
Co-authored-by: Modship <yeskinokay@gmail.com>
Co-authored-by: AurelienFT <32803821+AurelienFT@users.noreply.github.com>
Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
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.

FinalState: MIP store prefix is not checked in finalize function
3 participants