-
Notifications
You must be signed in to change notification settings - Fork 21
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
Catch error in proof of work to get contracts parsing error #628
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
we might have some test cases? |
cd2e7ce
to
03a8728
Compare
03a8728
to
5265ace
Compare
be9b608
to
dddcc9e
Compare
Hello, |
Neylix
approved these changes
Dec 2, 2022
e01f9dd
to
36e524b
Compare
tenmoves
pushed a commit
to tenmoves/archethic-node
that referenced
this pull request
Dec 6, 2022
To simplify the interpreter, it is now built of two interpreters: * Add Condition's interpreter * Add Action's interpreter Hence, the validation is easier to handle and to customize. This PR brings other improvements: * Update interpreters * Uniform the binary/hex handling in smart contract * Fix SC call inputs serialization * Clean inputs ETS table for SC calls * Clear pending transactions table Co-authored-by: Neylix <julien.leclerc05@protonmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
core team
Assigned to the core team
mining
Involve transaction validation and mining
smart contracts
Involve smart contracts
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves an issue occurred when you are passing invalid smart contract code to the network.
The Proof of work was trying to parse the contract to get the origin family, but without catching the error.
Type of change
How Has This Been Tested?
Create a transaction with invalid keyword in the contract, it should return an invalid transaction with the error returned as "unexpected-token - xxxx - LX"
Checklist: