-
Notifications
You must be signed in to change notification settings - Fork 368
Added KZG computeCells method #9375
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
Merged
lucassaldanha
merged 9 commits into
Consensys:master
from
lucassaldanha:kzg-distributed-proof
Apr 28, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9fa0747
Added KZG computeCells method
lucassaldanha 974861d
Moved KZG no-operation logic into testFixture class
lucassaldanha e4ec27c
Fix import
lucassaldanha 53a842b
Spotless
lucassaldanha 50d7bcb
Fix no-op returning null
lucassaldanha c0d2d5f
fix
lucassaldanha 27554e1
Merge branch 'master' into kzg-distributed-proof
lucassaldanha 0cf197e
Merge branch 'master' into kzg-distributed-proof
lucassaldanha 2dc224a
Merge branch 'master' into kzg-distributed-proof
lucassaldanha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
84 changes: 84 additions & 0 deletions
84
infrastructure/kzg/src/testFixtures/java/tech/pegasys/teku/kzg/NoOpKZG.java
This file contains hidden or 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,84 @@ | ||
| /* | ||
| * Copyright Consensys Software Inc., 2025 | ||
| * | ||
| * 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. | ||
| */ | ||
|
|
||
| package tech.pegasys.teku.kzg; | ||
|
|
||
| import java.util.List; | ||
| import org.apache.tuweni.bytes.Bytes; | ||
| import org.apache.tuweni.bytes.Bytes48; | ||
|
|
||
| public class NoOpKZG implements KZG { | ||
|
|
||
| public static final NoOpKZG INSTANCE = new NoOpKZG(); | ||
|
|
||
| @Override | ||
| public void loadTrustedSetup(final String trustedSetupFile) throws KZGException { | ||
| // DO NOTHING | ||
| } | ||
|
|
||
| @Override | ||
| public void freeTrustedSetup() throws KZGException { | ||
| // DO NOTHING | ||
| } | ||
|
|
||
| @Override | ||
| public boolean verifyCellProofBatch( | ||
| final List<KZGCommitment> commitments, | ||
| final List<KZGCellWithColumnId> cellWithIDs, | ||
| final List<KZGProof> proofs) { | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| public List<KZGCellAndProof> recoverCellsAndProofs(final List<KZGCellWithColumnId> cells) { | ||
| return List.of(); | ||
| } | ||
|
|
||
| @Override | ||
| @Deprecated(since = "Use computeCells instead, computeCellsAndProof is not for production") | ||
| public List<KZGCellAndProof> computeCellsAndProofs(final Bytes blob) { | ||
| return List.of(); | ||
| } | ||
|
|
||
| @Override | ||
| public List<KZGCell> computeCells(final Bytes blob) { | ||
| return List.of(); | ||
| } | ||
|
|
||
| @Override | ||
| public KZGProof computeBlobKzgProof(final Bytes blob, final KZGCommitment kzgCommitment) | ||
| throws KZGException { | ||
| return KZGProof.fromBytesCompressed(Bytes48.ZERO); | ||
| } | ||
|
|
||
| @Override | ||
| public KZGCommitment blobToKzgCommitment(final Bytes blob) throws KZGException { | ||
| return KZGCommitment.fromBytesCompressed(Bytes48.ZERO); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean verifyBlobKzgProofBatch( | ||
| final List<Bytes> blobs, | ||
| final List<KZGCommitment> kzgCommitments, | ||
| final List<KZGProof> kzgProofs) | ||
| throws KZGException { | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean verifyBlobKzgProof( | ||
| final Bytes blob, final KZGCommitment kzgCommitment, final KZGProof kzgProof) | ||
| throws KZGException { | ||
| return true; | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.