Skip to content

Commit

Permalink
Added liveness enforcement.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-André Long committed Jul 11, 2024
1 parent b07a268 commit de33c2a
Show file tree
Hide file tree
Showing 19 changed files with 6,894 additions and 194 deletions.
9 changes: 9 additions & 0 deletions development/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

source ./development/.env

LATEST_HEIGHT_ENDPOINT="$NODE_URL/testnet/latest/height";
TRANSACTION_ENDPOINT="$NODE_URL/testnet/transaction";
BROADCAST_ENDPOINT="$TRANSACTION_ENDPOINT/broadcast";

Expand Down Expand Up @@ -93,6 +94,13 @@ SLEEP_BETWEEN_TX=10
}


# Get current block height

latest_height=$(
curl "$LATEST_HEIGHT_ENDPOINT"
);


# List NFT
{
secret_random_viewkey="$((1 + $RANDOM % 100000))scalar"
Expand Down Expand Up @@ -128,6 +136,7 @@ SLEEP_BETWEEN_TX=10
$((1 + $RANDOM % 100000))field
]" \
"$validators" \
"${latest_height}u32"\
| awk 'NR==6'
);
sleep $SLEEP_BETWEEN_TX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ program marketplace_example.aleo {
public dcp_key: field, // random scalar
private secret_random_viewkey: scalar,
private privacy_random_coefficients: [field; 15],
private validators: [address; 16],
public validators: [address; 16],
public current_block_height: u32
) -> (NFTView, Future) {
let (nft_view, transfer_future): (arc721_example.aleo/NFTView, Future)
= arc721_example.aleo/transfer_private_to_public(
Expand All @@ -69,7 +70,8 @@ program marketplace_example.aleo {
dcp_key, // private custody_key: field,
privacy_random_coefficients, // private coefficients: [field; 15],
validators, // private validators: [address; 16],
MPC_THRESHOLD // private threshold: u8 <= 15
MPC_THRESHOLD, // private threshold: u8 <= 15
current_block_height
);

let list_future: Future = finalize_list(
Expand Down
Loading

0 comments on commit de33c2a

Please sign in to comment.