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

Optimize: change contract function visibility to "external" #465

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/verifier_fflonk.sol.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ contract FflonkVerifier {
<% inversionArray.push(`pEval_l${i}`); -%>
<% } -%>

function verifyProof(bytes32[24] calldata proof, uint256[<%- Math.max(nPublic, 1) %>] calldata pubSignals) public view returns (bool) {
function verifyProof(bytes32[24] calldata proof, uint256[<%- Math.max(nPublic, 1) %>] calldata pubSignals) external view returns (bool) {
assembly {
// Computes the inverse of an array of values
// See https://vitalik.ca/general/2018/07/21/starks_part_3.html in section where explain fields operations
Expand Down
2 changes: 1 addition & 1 deletion templates/verifier_groth16.sol.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ contract Groth16Verifier {

uint16 constant pLastMem = 896;

function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[<%=IC.length-1%>] calldata _pubSignals) public view returns (bool) {
function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[<%=IC.length-1%>] calldata _pubSignals) external view returns (bool) {
assembly {
function checkField(v) {
if iszero(lt(v, q)) {
Expand Down
2 changes: 1 addition & 1 deletion templates/verifier_plonk.sol.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ contract PlonkVerifier {

uint16 constant lastMem = <%=pLastMem%>;

function verifyProof(uint256[24] calldata _proof, uint256[<%=nPublic%>] calldata _pubSignals) public view returns (bool) {
function verifyProof(uint256[24] calldata _proof, uint256[<%=nPublic%>] calldata _pubSignals) external view returns (bool) {
assembly {
/////////
// Computes the inverse using the extended euclidean algorithm
Expand Down
2 changes: 1 addition & 1 deletion test/fflonk/verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ contract FflonkVerifier {
uint16 constant lastMem = 1920;


function verifyProof(bytes32[24] calldata proof, uint256[1] calldata pubSignals) public view returns (bool) {
function verifyProof(bytes32[24] calldata proof, uint256[1] calldata pubSignals) external view returns (bool) {
assembly {
// Computes the inverse of an array of values
// See https://vitalik.ca/general/2018/07/21/starks_part_3.html in section where explain fields operations
Expand Down
2 changes: 1 addition & 1 deletion test/plonk_circuit/verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ contract PlonkVerifier {

uint16 constant lastMem = 864;

function verifyProof(bytes memory proof, uint[] memory pubSignals) public view returns (bool) {
function verifyProof(bytes memory proof, uint[] memory pubSignals) external view returns (bool) {
assembly {
/////////
// Computes the inverse using the extended euclidean algorithm
Expand Down