-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implementation uses a default (panicking) implementation of the KZG commitment computation as we do not know how these must be computed.
- Loading branch information
1 parent
7ab51e4
commit 1d93fe6
Showing
5 changed files
with
47 additions
and
14 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
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,18 @@ | ||
use cairo_vm::Felt252; | ||
|
||
pub trait KzgCommitmentComputer { | ||
fn compute_kzg_commitment_from_coefficients(&self, coefficients: &[Felt252]) -> (Felt252, Felt252); | ||
} | ||
|
||
/// A struct with a default implementation of the KZG commitment computation. | ||
/// | ||
/// We do not know yet how to compute the KZG commitment, this structure is a default | ||
/// implementation that will panic until we figure it out properly. | ||
#[derive(Debug)] | ||
pub struct PlaceholderKzgCommitmentComputer; | ||
|
||
impl KzgCommitmentComputer for PlaceholderKzgCommitmentComputer { | ||
fn compute_kzg_commitment_from_coefficients(&self, _coefficients: &[Felt252]) -> (Felt252, Felt252) { | ||
todo!("Define correct method to compute KZG commitment"); | ||
} | ||
} |
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
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
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