Skip to content

Commit

Permalink
ensure did uses etherum_pk, and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoury committed Feb 17, 2025
1 parent b4e9a66 commit 594af8c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions ic/managed/verifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ To deploy the canister locally, follow these steps:

### Caveats

#### `clang` dependency

**On macOS:** If you are experiencing issues during `cargo build` where the `ring` library fails to compile, this is typically due to `clang` not being found.

To resolve this, you can install `clang` using Homebrew.
Expand All @@ -51,3 +53,13 @@ Alternatively, you can set the following environment variables:
export WASI_SDK_PATH=/usr/local/wasi-sdk-25.0
export CC_wasm32_wasip1="${WASI_SDK_PATH}/bin/clang"
```

#### `etherum_pk`

The `etherum_pk` field in the `PublicKeyReply` struct is the Ethereum address derived from the Sec1 public key. This is done using the `get_address_from_public_key` function in the `ethereum` module.

```rust
let address = ethereum::get_address_from_public_key(res.public_key.clone()).expect("INVALID_PUBLIC_KEY");
```

*It should be spelled `ethereum_pk` and not `etherum_pk`.*
6 changes: 3 additions & 3 deletions ic/managed/verifier/verity_verifier.did
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ service : {
"ping" : () -> (text) query;
"verify_proof_direct" : (proof_requests : vec text, notary_pub_key : text) -> (DirectVerificationResult);
"verify_proof_async" : (proof_requests : vec text, notary_pub_key : text) -> (ProofVerificationResponse);
"verify_proof_direct_batch": (batches: vec ProofBatch) -> (DirectVerificationResult);
"verify_proof_async_batch" : (batches: vec ProofBatch) -> (ProofVerificationResponse);
"public_key" : () -> (record { sec1_pk : text; ethereum_pk : text });
"verify_proof_direct_batch": (batches: vec ProofBatch) -> (DirectVerificationResult);
"verify_proof_async_batch" : (batches: vec ProofBatch) -> (ProofVerificationResponse);
"public_key" : () -> (record { sec1_pk : text; etherum_pk : text });
};

0 comments on commit 594af8c

Please sign in to comment.