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

UnsignedBigInt result type for Global.powHit #1049

Open
wants to merge 1 commit into
base: v6.0.0
Choose a base branch
from

Conversation

kushti
Copy link
Member

@kushti kushti commented Jan 10, 2025

In this PR, Global.powHit result type set to UnsignedBigInt

@kushti kushti requested a review from aslesarenko January 20, 2025 14:35
val cost = PowHitCostKind.cost(k, msg, nonce, h)
E.addCost(FixedCost(cost), powHitMethod.opDesc)
CBigInt(Autolykos2PowValidation.hitForVersion2ForMessageWithChecks(k, msg.toArray, nonce.toArray, h.toArray, N).bigInteger)
CUnsignedBigInt(Autolykos2PowValidation.hitForVersion2ForMessageWithChecks(k, msg.toArray, nonce.toArray, h.toArray, N).bigInteger)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the resulting big int be checked to into 256 bits?

Copy link
Member Author

Choose a reason for hiding this comment

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

Shouldn't the resulting big int be checked to into 256 bits?

It is checked during CUnsignedBigInt construction (as well as non-negativity)

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