From dd88958f24248fe54c70fa8214e89355a7bb864a Mon Sep 17 00:00:00 2001 From: prabal-banerjee Date: Tue, 11 Jan 2022 20:50:27 +0530 Subject: [PATCH] fix: uint size for higher powers in PLONK verifier sol --- templates/verifier_plonk.sol.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/verifier_plonk.sol.ejs b/templates/verifier_plonk.sol.ejs index 8663987..d6054cc 100644 --- a/templates/verifier_plonk.sol.ejs +++ b/templates/verifier_plonk.sol.ejs @@ -23,7 +23,7 @@ pragma solidity >=0.7.0 <0.9.0; contract PlonkVerifier { - uint16 constant n = <%=2**power%>; + uint<%=2**Math.ceil(Math.log2(power))%> constant n = <%=2**power%>; uint16 constant nPublic = <%=nPublic%>; uint16 constant nLagrange = <%=Math.max(nPublic, 1)%>;