Test optimized backfill (skips attested proofs)
This commit is contained in:
parent
810d26b7af
commit
3b54e0cb8c
7 changed files with 38 additions and 4 deletions
BIN
.ots/c0685dabfb48360a3abc103b75357f94e9f054b2.ots
Normal file
BIN
.ots/c0685dabfb48360a3abc103b75357f94e9f054b2.ots
Normal file
Binary file not shown.
|
|
@ -2,3 +2,8 @@
|
|||
4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963:db6f29e01a33d8ed8f127ff169d9f91d55e8a229
|
||||
db6f29e01a33d8ed8f127ff169d9f91d55e8a229:392ee723c3cf626d0e5281aa94771d7133bb345e
|
||||
392ee723c3cf626d0e5281aa94771d7133bb345e:392ee723c3cf626d0e5281aa94771d7133bb345e^1
|
||||
c0685dabfb48360a3abc103b75357f94e9f054b2:46aded7b9582bbed673843e2cf8a3f8fa742ad91
|
||||
46aded7b9582bbed673843e2cf8a3f8fa742ad91:4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963
|
||||
4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963:db6f29e01a33d8ed8f127ff169d9f91d55e8a229
|
||||
db6f29e01a33d8ed8f127ff169d9f91d55e8a229:392ee723c3cf626d0e5281aa94771d7133bb345e
|
||||
392ee723c3cf626d0e5281aa94771d7133bb345e:392ee723c3cf626d0e5281aa94771d7133bb345e^1
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
46aded7b9582bbed673843e2cf8a3f8fa742ad91
|
||||
c0685dabfb48360a3abc103b75357f94e9f054b2
|
||||
|
|
|
|||
BIN
.ots/proof.ots
BIN
.ots/proof.ots
Binary file not shown.
|
|
@ -55,13 +55,21 @@ for COMMIT in $COMMITS; do
|
|||
PROOF_FILE=".ots/${COMMIT}.ots"
|
||||
|
||||
if [ -f "$PROOF_FILE" ]; then
|
||||
# Try to upgrade existing proof
|
||||
echo " Upgrading existing proof..."
|
||||
# Check if already fully attested
|
||||
STATUS=$(ots info "$PROOF_FILE" 2>&1 | grep -c "PendingAttestation" || echo "0")
|
||||
|
||||
if [ "$STATUS" -eq 0 ]; then
|
||||
echo " ✓ Already attested (skipping)"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Try to upgrade existing proof (only contacts calendars if pending)
|
||||
echo " Upgrading pending proof..."
|
||||
if ots upgrade "$PROOF_FILE" 2>/dev/null; then
|
||||
echo " ✓ Upgraded to attested"
|
||||
UPDATED=$((UPDATED + 1))
|
||||
else
|
||||
echo " - Still pending (no upgrade available)"
|
||||
echo " - Still pending (no upgrade available yet)"
|
||||
fi
|
||||
else
|
||||
# Generate new proof for this commit
|
||||
|
|
|
|||
20
check-attestation.sh
Executable file
20
check-attestation.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
# check-attestation.sh - Check if an OpenTimestamp proof is fully attested
|
||||
# Usage: check-attestation.sh <proof-file>
|
||||
# Returns: 0 if fully attested, 1 if pending
|
||||
|
||||
PROOF_FILE="${1:-}"
|
||||
|
||||
if [ -z "$PROOF_FILE" ] || [ ! -f "$PROOF_FILE" ]; then
|
||||
echo "Error: proof file not found: $PROOF_FILE" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Check for PendingAttestation in ots info output
|
||||
if ots info "$PROOF_FILE" 2>&1 | grep -q "PendingAttestation"; then
|
||||
echo "pending"
|
||||
exit 1
|
||||
else
|
||||
echo "attested"
|
||||
exit 0
|
||||
fi
|
||||
1
test5.txt
Normal file
1
test5.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test optimized backfill
|
||||
Loading…
Add table
Add a link
Reference in a new issue