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 crates/contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ These functions require the caller to be a participant or candidate.
| `config()` | Returns the contract configuration. | `&ConfigV1` | TBD | TBD |
| `version()` | Returns the contract version. | `String` | TBD | TBD |
| `update_config(config: ConfigV1)` | Updates the contract configuration for `V1`. | `()` | TBD | TBD |
| `allowed_docker_image_hashes()` | Returns all currently allowed MPC Docker image hashes. | `Vec<NodeImageHash>` | TBD | TBD |
| `allowed_docker_image_hashes()` | Returns all currently allowed MPC Docker image hashes with their eviction expiry, newest first. | `Vec<AllowedMpcDockerImageHash>` | TBD | TBD |
| `allowed_launcher_image_hashes()` | Returns all currently allowed launcher image hashes. | `Vec<LauncherImageHash>` | TBD | TBD |
| `allowed_launcher_compose_hashes()` | Returns all currently allowed launcher compose hashes (derived from launcher + MPC image pairs). | `Vec<LauncherDockerComposeHash>` | TBD | TBD |
| `launcher_hash_votes()` | Returns current launcher hash votes, showing each participant's vote. | `LauncherHashVotes` | TBD | TBD |
Expand Down
2 changes: 1 addition & 1 deletion docs/securing-mpc-with-tee-design-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ pub struct Contract {

///Returns all whitelisted Docker image hashes that have been approved
/// by the DAO and verified by the TEE.
pub fn allowed_docker_image_hashes(&self) -> Vec<NodeImageHash>
pub fn allowed_docker_image_hashes(&self) -> Vec<AllowedMpcDockerImageHash>

/// Verifies if all current participants have an accepted TEE state.
/// Automatically enters a resharing, in case one or more participants do not have an accepted
Expand Down
2 changes: 1 addition & 1 deletion localnet/tee/scripts/rust-launcher/test-hash-override.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test_override() {
# Verify the hash is in the approved list
local approved
approved="$(near_call_ro allowed_docker_image_hashes '{}' | extract_json_ro)"
if ! echo "$approved" | jq -e --arg h "$override_hash" '.[] | select(. == $h)' >/dev/null 2>&1; then
if ! echo "$approved" | jq -e --arg h "$override_hash" '.[] | select(.image_hash == $h)' >/dev/null 2>&1; then
err "Hash $override_hash is NOT in the approved list. Cannot test override."
echo "$approved"
return 1
Expand Down
4 changes: 2 additions & 2 deletions localnet/tee/scripts/rust-launcher/test-verify-and-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ upgrade_cluster() {
# Check if already approved
local current_hashes
current_hashes="$(near_call_ro allowed_docker_image_hashes '{}' | extract_json_ro)"
if echo "$current_hashes" | jq -e --arg h "$new_hash" '.[] | select(. == $h)' >/dev/null 2>&1; then
if echo "$current_hashes" | jq -e --arg h "$new_hash" '.[] | select(.image_hash == $h)' >/dev/null 2>&1; then
warn "Hash $new_hash is already approved — skipping vote"
else
# --- 2.1 Vote for new MPC hash ---
Expand Down Expand Up @@ -228,7 +228,7 @@ upgrade_cluster() {
# Verify vote succeeded
local updated_hashes
updated_hashes="$(near_call_ro allowed_docker_image_hashes '{}' | extract_json_ro)"
if echo "$updated_hashes" | jq -e --arg h "$new_hash" '.[] | select(. == $h)' >/dev/null 2>&1; then
if echo "$updated_hashes" | jq -e --arg h "$new_hash" '.[] | select(.image_hash == $h)' >/dev/null 2>&1; then
pass "New hash approved on-chain: $new_hash"
else
fail "Hash not found in approved list after voting"
Expand Down
Loading