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 for massa execution #2296

Merged
merged 3 commits into from
Mar 22, 2022
Merged

Conversation

adrien-zinger
Copy link
Contributor

@adrien-zinger adrien-zinger commented Feb 15, 2022

Add tests for the execution module & fix events.

Related with the issue #2079, we want to add test in the execution module. I suggest to not duplicate all tests, but test the layer of the massa usage. For example, we add the events and the current PR test if the implementation is good.

Add a unit test for the event generation, build a local wasm project on massa-execution build. Then execute the test.

Fixes: the events were not stored correctly in final_events
Changes: Filter slot, include last slot.

this PR was a draft because we need to merge #2290 before

@adrien-zinger adrien-zinger self-assigned this Feb 15, 2022
@adrien-zinger adrien-zinger linked an issue Feb 15, 2022 that may be closed by this pull request
@adrien-zinger adrien-zinger marked this pull request as draft February 15, 2022 15:58
@adrien-zinger adrien-zinger force-pushed the feature/add_tests_for_massa_execution branch from 177b8f7 to 1c09292 Compare February 15, 2022 16:21
@adrien-zinger adrien-zinger changed the title Feature/add tests for massa execution Add tests for massa execution Feb 16, 2022
@adrien-zinger adrien-zinger force-pushed the feature/add_tests_for_massa_execution branch from 1c09292 to 3a1afe2 Compare February 23, 2022 09:05
@adrien-zinger adrien-zinger marked this pull request as ready for review February 23, 2022 09:08
yvan-sraka
yvan-sraka previously approved these changes Feb 23, 2022
Copy link
Contributor

@yvan-sraka yvan-sraka left a comment

Choose a reason for hiding this comment

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

LGTM, event if I would prefer to import wasm_tests as a git submodule or an external dependency rather than adding it to this repo ...

@damip damip self-requested a review February 23, 2022 09:23
AureliaDolo
AureliaDolo previously approved these changes Feb 23, 2022
@adrien-zinger
Copy link
Contributor Author

bors merge

bors bot added a commit that referenced this pull request Feb 23, 2022
2296: Add tests for massa execution r=adrien-zinger a=adrien-zinger

Add tests for the execution module & fix events.

Related with the issue #2079, we want to add test in the execution module. I suggest to not duplicate all tests, but test the layer of the massa usage. For example, we add the events and the current PR test if the implementation is good.

Add a unit test for the event generation, build a local wasm project on massa-execution build. Then execute the test.
    
Fixes: the events were not stored correctly in `final_events`
Changes: Filter slot, include last slot.


_this PR was a draft because we need to merge #2290 before_


Co-authored-by: Adrien Zinger <zinger.ad@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 23, 2022

Build failed:

@adrien-zinger adrien-zinger dismissed stale reviews from AureliaDolo and yvan-sraka via 18873b7 February 23, 2022 15:50
AureliaDolo
AureliaDolo previously approved these changes Feb 23, 2022
@damip damip mentioned this pull request Feb 23, 2022
25 tasks
Copy link
Member

@damip damip left a comment

Choose a reason for hiding this comment

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

Warning; this adds a major dependency for the whole build system (yarn + all the JS/AS libs), even when not building tests but just compiling the program !

Would it be possible to put that behind a feature that disables this dependency and the tests that depend on it when it's off ? And to make sure that just building the node doesn't require a yarn setup ?

Copy link
Member

@damip damip left a comment

Choose a reason for hiding this comment

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

I still see the problem I mentionned in my previous review

bors bot added a commit that referenced this pull request Mar 1, 2022
2249: Speculative execution support r=damip a=damip

# Intro

This is a rewrite of the execution system following the spec we already agreed upon, as well as good practices and with the big refactoring constraints in mind.

# Goals

* [x] enable speculative execution
* [x] get ready for ledger unification

# Practices

* [x] no async because it's not needed
* [x] short functions (max 50 lines of code)
* [x] no panics, unless described
* crates split between worker and exports
  * [x] execution
  * [x] ledger: it will be refactored for on-disk storage, we will split it then => #2342
* thorough documentation
  * [x] function docs
  * [x] algorithm description
  * [x] file-level documentation
  * [x] crate-level documentation
* [x] test exports
* [x] unit and functional tests: to be added in a followup #2296
* [x] use genericity whenever possible
* [x] clippy lints

# Checklist

* [x] implement speculative execution
* [x] split execution into worker/exports crates
* [x] create massa-ledger crate
* [x] integrate execution and ledger into the existing program
* [x] repair bootstrap tests
* [x] repair consensus tests
* [x] improve documentation
* [x] try on labnet
* [x] reactivate execution tests => will be done in a followup #2296
* [x] add specific tests => will be done in the followup #2296


Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
Co-authored-by: damip <damipator@gmail.com>
@damip
Copy link
Member

damip commented Mar 1, 2022

When #2249 is merged, we can adapt this one

bors bot added a commit that referenced this pull request Mar 1, 2022
2249: Speculative execution support r=damip a=damip

# Intro

This is a rewrite of the execution system following the spec we already agreed upon, as well as good practices and with the big refactoring constraints in mind.

# Goals

* [x] enable speculative execution
* [x] get ready for ledger unification

# Practices

* [x] no async because it's not needed
* [x] short functions (max 50 lines of code)
* [x] no panics, unless described
* crates split between worker and exports
  * [x] execution
  * [x] ledger: it will be refactored for on-disk storage, we will split it then => #2342
* thorough documentation
  * [x] function docs
  * [x] algorithm description
  * [x] file-level documentation
  * [x] crate-level documentation
* [x] test exports
* [x] unit and functional tests: to be added in a followup #2296
* [x] use genericity whenever possible
* [x] clippy lints

# Checklist

* [x] implement speculative execution
* [x] split execution into worker/exports crates
* [x] create massa-ledger crate
* [x] integrate execution and ledger into the existing program
* [x] repair bootstrap tests
* [x] repair consensus tests
* [x] improve documentation
* [x] try on labnet
* [x] reactivate execution tests => will be done in a followup #2296
* [x] add specific tests => will be done in the followup #2296


Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
Co-authored-by: damip <damipator@gmail.com>
bors bot added a commit that referenced this pull request Mar 1, 2022
2249: Speculative execution support r=damip a=damip

# Intro

This is a rewrite of the execution system following the spec we already agreed upon, as well as good practices and with the big refactoring constraints in mind.

# Goals

* [x] enable speculative execution
* [x] get ready for ledger unification

# Practices

* [x] no async because it's not needed
* [x] short functions (max 50 lines of code)
* [x] no panics, unless described
* crates split between worker and exports
  * [x] execution
  * [x] ledger: it will be refactored for on-disk storage, we will split it then => #2342
* thorough documentation
  * [x] function docs
  * [x] algorithm description
  * [x] file-level documentation
  * [x] crate-level documentation
* [x] test exports
* [x] unit and functional tests: to be added in a followup #2296
* [x] use genericity whenever possible
* [x] clippy lints

# Checklist

* [x] implement speculative execution
* [x] split execution into worker/exports crates
* [x] create massa-ledger crate
* [x] integrate execution and ledger into the existing program
* [x] repair bootstrap tests
* [x] repair consensus tests
* [x] improve documentation
* [x] try on labnet
* [x] reactivate execution tests => will be done in a followup #2296
* [x] add specific tests => will be done in the followup #2296


Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
Co-authored-by: damip <damipator@gmail.com>
bors bot added a commit that referenced this pull request Mar 1, 2022
2249: Speculative execution support r=damip a=damip

# Intro

This is a rewrite of the execution system following the spec we already agreed upon, as well as good practices and with the big refactoring constraints in mind.

# Goals

* [x] enable speculative execution
* [x] get ready for ledger unification

# Practices

* [x] no async because it's not needed
* [x] short functions (max 50 lines of code)
* [x] no panics, unless described
* crates split between worker and exports
  * [x] execution
  * [x] ledger: it will be refactored for on-disk storage, we will split it then => #2342
* thorough documentation
  * [x] function docs
  * [x] algorithm description
  * [x] file-level documentation
  * [x] crate-level documentation
* [x] test exports
* [x] unit and functional tests: to be added in a followup #2296
* [x] use genericity whenever possible
* [x] clippy lints

# Checklist

* [x] implement speculative execution
* [x] split execution into worker/exports crates
* [x] create massa-ledger crate
* [x] integrate execution and ledger into the existing program
* [x] repair bootstrap tests
* [x] repair consensus tests
* [x] improve documentation
* [x] try on labnet
* [x] reactivate execution tests => will be done in a followup #2296
* [x] add specific tests => will be done in the followup #2296


Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
Co-authored-by: damip <damipator@gmail.com>
@adrien-zinger adrien-zinger force-pushed the feature/add_tests_for_massa_execution branch from c37a5ee to cf2e1a5 Compare March 3, 2022 07:42
@adrien-zinger
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Mar 3, 2022
@bors
Copy link
Contributor

bors bot commented Mar 3, 2022

try

Build failed:

yvan-sraka
yvan-sraka previously approved these changes Mar 9, 2022
Copy link
Contributor

@yvan-sraka yvan-sraka left a comment

Choose a reason for hiding this comment

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

LGTM (nice improvements happen here)! With few comments 👍

massa-hash/src/error.rs Show resolved Hide resolved
massa-ledger/src/test_exports/config.rs Show resolved Hide resolved
adrien-zinger and others added 2 commits March 22, 2022 11:12
Co-authored-by: Aurelia <56112063+AureliaDolo@users.noreply.github.com>
@adrien-zinger adrien-zinger force-pushed the feature/add_tests_for_massa_execution branch from 5e1183a to a9eaf83 Compare March 22, 2022 10:16
@damip damip requested review from AureliaDolo and yvan-sraka March 22, 2022 11:38
@damip
Copy link
Member

damip commented Mar 22, 2022

Let's reboot this :)

Prioritary review !

@yvan-sraka
Copy link
Contributor

bors merge

@damip
Copy link
Member

damip commented Mar 22, 2022

thanks @yvan-sraka that was fast !

@bors
Copy link
Contributor

bors bot commented Mar 22, 2022

Build succeeded:

@bors bors bot merged commit af2ecd0 into main Mar 22, 2022
@bors bors bot deleted the feature/add_tests_for_massa_execution branch March 22, 2022 12:41
SecorD0 pushed a commit to SecorD0/massa-fixing that referenced this pull request Dec 2, 2022
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.

test a scenario in execution
4 participants