test-injection.sh 799 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # This script submits a guardian set update using the VAA injection admin command.
  3. # First argument is node to submit to. Second argument is current set index.
  4. set -e
  5. node=$1
  6. idx=$2
  7. path=/tmp/new-guardianset.prototxt
  8. sock=/tmp/admin.sock
  9. # Create a no-op update that sets the same 1-node guardian set again.
  10. kubectl exec -n wormhole guardian-${node} -c guardiand -- /guardiand template guardian-set-update --num=1 --idx=${idx} $path
  11. # Verify and print resulting result. The digest incorporates the current time and is NOT deterministic.
  12. kubectl exec -n wormhole guardian-${node} -c guardiand -- /guardiand admin governance-vaa-verify $path
  13. # Submit to node
  14. kubectl exec -n wormhole guardian-${node} -c guardiand -- /guardiand admin governance-vaa-inject --socket $sock $path