Skip to content
Merged
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 akd_core/src/proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl TryFrom<&specs::types::SiblingProof> for crate::SiblingProof {
let label: crate::NodeLabel = input.label.as_ref().unwrap().try_into()?;

// get the raw data & it's length, but at most crate::hash::DIGEST_BYTES bytes
let siblings = input.siblings.get(0);
let siblings = input.siblings.first();
if siblings.is_none() {
return Err(ConversionError::Deserialization(
"Required field siblings missing".to_string(),
Expand Down
6 changes: 5 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ cargo run -p examples --release -- whatsapp-kt-auditor -l

This example requires setting up [Docker](https://docs.docker.com/get-docker/) (which will host the MySQL instance). Once Docker
is up and running, you can simply run:
```bash
docker compose up [-d]
```
in the root of repository to spin up the MySQL instance and then run:
```bash
cargo run -p examples --release -- mysql-demo
```
to run the demo. You can also pass the `--help` argument to view various options for running benchmarks and auto-populating the instance.
Expand Down Expand Up @@ -67,4 +71,4 @@ the tests should now pass.
This example, unlike the others, is not executable and is mainly intended to demonstrate how an application can build the WASM bindings
for the client operations. Since the client operations only depend on the `akd_core` crate, which has fewer dependencies than the full
`akd` crate, the resulting WASM library will be much more condensed than simply building directly from `akd`. You can take a look in the
`wasm_client/` sub-directory for a simple example set of bindings for a client that wishes to verify proofs generated by the server.
`wasm_client/` sub-directory for a simple example set of bindings for a client that wishes to verify proofs generated by the server.
3 changes: 1 addition & 2 deletions examples/src/mysql_demo/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ impl Command {
"end".blue()
);
println!(
" {}|{} {}:\t\tretrieve the root hash at given epoch (default = latest epoch)",
" {}|{}\t\tretrieve the root hash at the latest epoch",
"root".green(),
"root_hash".green(),
"epoch".magenta()
);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/src/whatsapp_kt_auditor/auditor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub(crate) async fn audit_epoch(blob: akd::local_auditing::AuditBlob) -> Result<
}
}

pub(crate) fn display_audit_proofs_info(info: &mut Vec<EpochSummary>) -> Result<String> {
pub(crate) fn display_audit_proofs_info(info: &mut [EpochSummary]) -> Result<String> {
info.sort_by(|a, b| a.name.epoch.cmp(&b.name.epoch));
if info.is_empty() {
bail!("There are no epochs present in the storage repository");
Expand Down