-
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
[6.0.0] Autolykos 2 validation for custom message #965
Conversation
@kushti is this ready for review? Asking because of the failing tests. |
@aslesarenko ready for review now |
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, and also see comments.
@@ -52,5 +54,39 @@ abstract class TypeBasedCost extends CostKind { | |||
* See [[EQ]], [[NEQ]]. */ | |||
case object DynamicCost extends CostKind | |||
|
|||
/** Cost of: | |||
* 1) converting numeric value to the numeric value of the given type, i.e. Byte -> Int | |||
* NOTE: the cost of BigInt casting is the same in JITC (comparing to AOTC) to simplify |
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.
This NOTE is obsolete as there is not AOTC anymore.
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.
fixed
@@ -2169,6 +2177,14 @@ object SigmaDslBuilder extends EntityObject("SigmaDslBuilder") { | |||
true, true, element[Coll[Byte]])) | |||
} | |||
|
|||
def powHit(k: Ref[Int], msg: Ref[Coll[Byte]], nonce: Ref[Coll[Byte]], h: Ref[Coll[Byte]], N: Ref[Int]): Ref[BigInt] = { | |||
println(SigmaDslBuilderClass.getDeclaredMethods().mkString(", ")) |
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.
The println can be removed?
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.
removed
707fa08
to
847063a
Compare
In this PR, Global.powHit() method implemented, to check PoW for custom variant of Autolykos2 hash function