Header flag to indicate that constant segregation should be applied.
Default header with constant segregation enabled.
Default value of ErgoTree.header byte
Header flag to indicate that whole size of ErgoTree should be saved before tree content.
Current version of ErgoTree serialization format (aka bite-code language version)
Header mask to extract version bits.
Create an ErgoTree with the given parameters.
Create new ErgoTree for the given proposition using the given header flags.
Create new ErgoTree for the given proposition using the given header flags. If the property is not a simple constant, then constant segregation is performed.
Create new ErgoTree for the given proposition using default header.
Create new ErgoTree for the given proposition using default header. If the property is not a simple constant, then constant segregation is performed.
Create new ErgoTree for the given sigma proposition using the given header flags and without performing constant segregation.
Create new ErgoTree for the given sigma proposition using default header and without performing constant segregation.
a value of the version bits from the given header byte.
true if the size flag is set to 1 in the given header byte.
Creates valid header byte with the given version.
Creates valid header byte with the given version. The SizeFlag is set if version > 0
true if the constant segregation flag is set to 1 in the given header byte.
Substitute ConstantPlaceholder nodes in the given expression with the constants taken from the given collection.
Substitute ConstantPlaceholder nodes in the given expression with the constants taken from the given collection.
expression to transform
collection of constants to replace placeholders
new expression without placeholders
Update the version bits of the given header byte with the given version value.
Update the version bits of the given header byte with the given version value.
Create new ErgoTree for the given sigma proposition using default header and also performing constant segregation.
Build ErgoTree via serialization of the value with ConstantSegregationHeader, constants segregated from the tree and ConstantPlaceholders referring to the segregated constants.
Build ErgoTree via serialization of the value with ConstantSegregationHeader, constants segregated from the tree and ConstantPlaceholders referring to the segregated constants.
This method uses single traverse of the tree to:
1) find and segregate all constants;
2) replace constants with ConstantPlaceholders in the tree
;
3) write the tree
to the Writer's buffer obtaining treeBytes
;
4) deserialize tree
with ConstantPlaceholders.
additional header flags to combine with ConstantSegregationHeader flag.
expression to be transformed into ErgoTree
Create new ErgoTree for the given proposition using the given header flags and without performing constant segregation.
Create new ErgoTree for the given proposition using the given header flags and without performing constant segregation.