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

Test for soft-forked acceptance of Ergoscript containing unknown methods (after 6.0 activation) #2146

Merged
merged 10 commits into from May 15, 2024

Conversation

kushti
Copy link
Member

@kushti kushti commented Apr 11, 2024

In this PR , a new test is added.

In this test we check how current version of the node (block protocol v3, at the moment of writing this test) will
execute a script which contains a method added in next version of the protocol (namely, BIgInt.nbits), which
is unknown to the node.

As shown in the test, rule #1110 (CheckAndGetMethod) should be replaced for new methods to be passed by the node not recognizing it.

@kushti kushti changed the base branch from master to v5.0.22 April 24, 2024 08:59
// the following ergo tree contains SBigInt.nbits method which is not supported by this client (as of 5.x version)
// ergo tree version is 3, less value (e.g. version = 2 which gives 1a130206022edf0580fcf622d193db060873007301)
// also works
val ergoTree = DefaultSerializer.deserializeErgoTree(Base16.decode("1b130206022edf0580fcf622d193db060873007301").get)
Copy link
Member

Choose a reason for hiding this comment

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

This ergoTree is UnparsedErgoTree? Maybe add the assertion.

@kushti kushti merged commit 53c8ed0 into v5.0.22 May 15, 2024
8 checks passed
@kushti kushti deleted the scriptv3-test branch May 15, 2024 10:08
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.

None yet

4 participants