-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from NilFoundation/74-lookup-compatibility
74 lookup compatibility
- Loading branch information
Showing
90 changed files
with
6,738 additions
and
26,880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: Apache-2.0. | ||
//---------------------------------------------------------------------------// | ||
// Copyright (c) 2023 Elena Tatuzova <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
//---------------------------------------------------------------------------// | ||
|
||
pragma solidity >=0.8.4; | ||
|
||
import "../types.sol"; | ||
|
||
interface ICommitmentScheme { | ||
function initialize( | ||
bytes32 tr_state_before | ||
) external returns(bytes32 tr_state_after); | ||
|
||
// Append commitments | ||
function verify_eval( | ||
bytes calldata blob, | ||
uint256[5] memory commitments, | ||
uint256 challenge, | ||
bytes32 transcript_state_before | ||
) external view returns (bool); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: Apache-2.0. | ||
//---------------------------------------------------------------------------// | ||
// Copyright (c) 2023 Elena Tatuzova <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
//---------------------------------------------------------------------------// | ||
pragma solidity ^0.8.0; | ||
|
||
interface IGateArgument { | ||
function verify( | ||
bytes calldata blob, | ||
uint256 theta | ||
) external view returns (uint256 F); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: Apache-2.0. | ||
//---------------------------------------------------------------------------// | ||
// Copyright (c) 2023 Elena Tatuzova <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
//---------------------------------------------------------------------------// | ||
pragma solidity ^0.8.0; | ||
|
||
interface ILookupArgument { | ||
function verify( | ||
bytes calldata blob, // Table values and permutations' values | ||
bytes calldata sorted, // Sorted batch values | ||
uint256 lookup_commitment, // Lookup commitment | ||
uint256 l0, | ||
bytes32 tr_state_before // It's better than transfer all random values | ||
) external view returns (uint256[4] memory F, bytes32 tr_state_after); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: Apache-2.0. | ||
//---------------------------------------------------------------------------// | ||
// Copyright (c) 2023 Elena Tatuzova <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
//---------------------------------------------------------------------------// | ||
pragma solidity ^0.8.0; | ||
|
||
interface IModularPermutationArgument { | ||
function verify( | ||
bytes calldata blob, | ||
uint256 beta, | ||
uint256 gamma | ||
) external view returns (uint256[3] memory F); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: Apache-2.0. | ||
//---------------------------------------------------------------------------// | ||
// Copyright (c) 2023 Elena Tatuzova <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
//---------------------------------------------------------------------------// | ||
pragma solidity ^0.8.0; | ||
|
||
interface IModularVerifier { | ||
function initialize( | ||
// address permutation_argument_contract_address, | ||
address lookup_argument_contract_address, | ||
address gate_argument_contract_address, | ||
address commitment_contract_address | ||
) external; | ||
|
||
function verify( | ||
bytes calldata blob, | ||
uint256[] calldata public_input | ||
) external view returns (bool result); | ||
} |
Oops, something went wrong.