-
Notifications
You must be signed in to change notification settings - Fork 41
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 flag isUsingBlockchainContext
to ErgoTree
#929
Add flag isUsingBlockchainContext
to ErgoTree
#929
Conversation
isUsingBlockchainContext
to ErgoTreeisUsingBlockchainContext
to ErgoTree
@kushti @aslesarenko Please review and let me know if there is anything else I need to do in this PR. Thank you. |
@megatron00999, I targeted the next release branch, please resolve the conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look how _hasDeserialize is initialized
var _hasDeserialize: Option[Boolean] = givenDeserialize
and were givenDeserialize comes from.
The key point is here where ErgoTree is created in the serializer with Some(...) value.
This way no additional traverse is necessary after deserialization, which is the main use case during tx validation and is critical for performance.
d772244
to
8fb2f3f
Compare
@aslesarenko Updated now. Added the detection of blockchain context during parsing in 44844ac |
data/shared/src/main/scala/sigma/serialization/MethodCallSerializer.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please fix the tests
tests need to be fixed first, otherwise LGTM
Strangely,
When I reran, the test passed. |
The tests should be fixed now with 0a2390d. |
@megatron00999 please reach me over Discord or email [email protected] and provide ERG address (ordinary or stealth) to get the bounty paid |
@kushti Thanks, sent you a message on Discord with the address. |
Fixes #928
Add a flag
isUsingBlockchainContext
to ErgoTree similar to the existinghasDeserialize
.