forked from AleoNet/snarkOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements inner_snark_pk and outer_snark_pk parameter fetching and l…
…oading
- Loading branch information
Showing
46 changed files
with
449 additions
and
127 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.idea/ | ||
**.DS_Store | ||
**storage_db | ||
dpc/src/parameters/inner_snark.params | ||
dpc/src/parameters/outer_snark.params | ||
**inner_snark_pk.params | ||
**outer_snark_pk.params |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod parameters; | ||
pub use self::parameters::*; |
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 @@ | ||
use std::fmt::Debug; | ||
|
||
#[derive(Debug, Error)] | ||
pub enum ParametersError { | ||
#[error("{}: {}", _0, _1)] | ||
Crate(&'static str, String), | ||
|
||
#[error("{}", _0)] | ||
Message(String), | ||
} | ||
|
||
impl From<curl::Error> for ParametersError { | ||
fn from(error: curl::Error) -> Self { | ||
ParametersError::Crate("curl::error", format!("{:?}", error)) | ||
} | ||
} | ||
|
||
impl From<std::io::Error> for ParametersError { | ||
fn from(error: std::io::Error) -> Self { | ||
ParametersError::Crate("std::io", format!("{:?}", error)) | ||
} | ||
} | ||
|
||
impl From<std::path::StripPrefixError> for ParametersError { | ||
fn from(error: std::path::StripPrefixError) -> Self { | ||
ParametersError::Crate("std::path", format!("{:?}", error)) | ||
} | ||
} | ||
|
||
impl From<ParametersError> for std::io::Error { | ||
fn from(error: ParametersError) -> Self { | ||
std::io::Error::new(std::io::ErrorKind::Other, format!("{:?}", error)) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pub mod parameter; | ||
pub use self::parameter::*; | ||
pub mod parameters; | ||
pub use self::parameters::*; |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
use snarkos_errors::parameters::ParametersError; | ||
|
||
pub trait Parameters { | ||
const SIZE: u64; | ||
const CHECKSUM: &'static str; | ||
|
||
fn load_bytes() -> Result<Vec<u8>, ParametersError>; | ||
} |
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
Oops, something went wrong.