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

[6.0.0] Autolykos 2 validation for custom message #965

Merged
merged 1 commit into from
Nov 22, 2024
Merged

[6.0.0] Autolykos 2 validation for custom message #965

merged 1 commit into from
Nov 22, 2024

Conversation

kushti
Copy link
Member

@kushti kushti commented Apr 16, 2024

In this PR, Global.powHit() method implemented, to check PoW for custom variant of Autolykos2 hash function

@kushti kushti added this to the v6.0 milestone Apr 16, 2024
@kushti kushti changed the base branch from develop to v6.0.0 April 16, 2024 17:18
@kushti kushti changed the title [6.0] Autolykos 2 validation methods [6.0.0] Autolykos 2 validation methods Apr 16, 2024
@kushti kushti changed the title [6.0.0] Autolykos 2 validation methods [6.0.0] Autolykos 2 validation for custom message Apr 24, 2024
@kushti kushti changed the base branch from v6.0.0 to i958-2 July 29, 2024 21:45
@kushti kushti requested a review from aslesarenko July 30, 2024 12:17
@aslesarenko
Copy link
Member

@kushti is this ready for review? Asking because of the failing tests.

@kushti
Copy link
Member Author

kushti commented Aug 7, 2024

@kushti is this ready for review? Asking because of the failing tests.

Makes sense to start with parent branch PR #968

@kushti
Copy link
Member Author

kushti commented Nov 19, 2024

@aslesarenko ready for review now

Copy link
Member

@aslesarenko aslesarenko left a 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
Copy link
Member

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.

Copy link
Member Author

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(", "))
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@kushti kushti force-pushed the i958 branch 6 times, most recently from 707fa08 to 847063a Compare November 22, 2024 10:32
@kushti kushti merged commit 6d5a18b into v6.0.0 Nov 22, 2024
4 checks passed
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.

2 participants