Skip to content

Commit

Permalink
Merge pull request #27 from hirosystems/chore/deployment-plans-clean-up
Browse files Browse the repository at this point in the history
chore: deployment plans clean up
  • Loading branch information
Ludo Galabru authored Dec 7, 2023
2 parents afb7b77 + 8d586d3 commit 1e066ed
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 254 deletions.
7 changes: 4 additions & 3 deletions contracts/wormhole/wormhole-core-v1.clar
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
(define-constant ERR_GSU_CHECK_CHAIN (err u1303))
;; Guardian Set Update new index invalid
(define-constant ERR_GSU_CHECK_INDEX (err u1304))
;; Quorum of addresses required
(define-constant QUORUM u13)

(define-constant hk-cursor-v2 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2)

Expand Down Expand Up @@ -176,7 +174,7 @@
(asserts! (is-eq (get version (get vaa message)) u1)
ERR_VAA_CHECKS_VERSION_UNSUPPORTED)
;; Ensure that the count of valid signatures is >= 13
(asserts! (>= (len (get result signatures-from-active-guardians)) QUORUM)
(asserts! (>= (len (get result signatures-from-active-guardians)) (get-quorum (len active-guardians)))
ERR_VAA_CHECKS_THRESHOLD_SIGNATURE)
;; Good to go!
(ok (get vaa message)))))
Expand Down Expand Up @@ -357,6 +355,9 @@
}
})))

(define-private (get-quorum (guardian-set-size uint))
(+ (/ (* guardian-set-size u2) u3) u1))

(define-private (is-guardian-cue (byte (buff 1)) (acc { cursor: uint, result: (list 19 uint) }))
(if (is-eq u0 (mod (get cursor acc) u20))
{
Expand Down
157 changes: 157 additions & 0 deletions deployments/default.mainnet-plan.yaml

Large diffs are not rendered by default.

File renamed without changes.
122 changes: 0 additions & 122 deletions deployments/dev-preview.mainnet-plan.yaml

This file was deleted.

129 changes: 0 additions & 129 deletions deployments/dev-preview.testnet-plan.yaml

This file was deleted.

File renamed without changes.
19 changes: 19 additions & 0 deletions deployments/utils/update-price.mainnet-plan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: 0
name: Mainnet deployment
network: mainnet
stacks-node: "https://api.hiro.so"
bitcoin-node: "http://blockstack:[email protected]:8332"
plan:
batches:
- id: 0
transactions:
- contract-call:
contract-id: SP19F0S4GN8CJQ4K9PKWRBVE00G2C86QTPTRXZ7GP.pyth-helper-v1
expected-sender: SP19F0S4GN8CJQ4K9PKWRBVE00G2C86QTPTRXZ7GP
method: verify-and-update-price
parameters:
# PNAU payload
- 0x504e41550100000003b801000000030d0002d213f58d7f9d7fc48fc2b2e99c51e7484a95fa339984e34cf92f03ad054d994c9ef0026a9bb6446d3b8ac5c1f3abb97df4e105ac57b1e191970eb7f6f4757e0002db2d3a1c1b7fd484aec6d58648263256dfeb23008f64af580c431900ed22d3194df8950c48e00461f2694b7f64e2e50f10bbd630d7c74c1d4287be913df5c306010318fbbdee25032ef071bae6c3570e7e5b3934ef207388e713170ec93b6c252a402b64a32b8a6a9b014deeb10aaa4b1fbed2064c89038de81cce3c81970c1713800104811679e99e5f5723c5d41241682b1cc881482b1bd1dfbe1ce5bf138189dbd2630f69cc75e81c1b23b7e04419ee6dbba72accb0e76e49d996299a34f5154294c00106b2f14ae4d4cb67ce39b920e76cd1f6ae98918dcd6e0ac0633e36343d8f623b2402bc85d974e45b0be7c8adba21f73693c012728aaad52d2cc6744279884d014600082aead75ff574662bb55297fd4d8d0c04ffe1adec400c61a049d0ee9a5cc905da6aa1fa1fa97a1c1dff9da23abfe5123f81e956223a42d96ff63ac49bd8247c8a000a81c622be7f87559bd1c2955c19e244275eae745a4b5f786ecb9c89b68a7b7ff7320fa7a5683e024303c301a315e8a8f67eb77f90a769f958dcaee416490df726000c298720f3303cd124f03155308d7dcd12445725bd0321b1d61fd6a720ec87be034d5a5fd45b8cd65d8e4880ee37a082f44b5122105547c35acbb29f51544c6b39010dbd566589e5f644f5d4d719a680e09f301c2917e7ca622fa1dab7551d481f23f629a880292debbc1ffbc04d96714aadc48be1b719067ceb611286de312bdba2e0010e598b69cc78e66deef66e79714b5c6374b482870076ecfa44c440f819ee83b5754fa5255ce8ec5e2be6ffb274948dbf49aabb4040d6a3576bea8c6aef222e57bc0010591d8c591af760a4723fe709118bc9b87e050be1589f330d1ce3402fd602ac5b08c54812e42a953946aec9d81b95582a96b82e91438040a69633ba7e4b1102b50011e97153c1e98d8df48b77e71f24ed174c8ef1d3f6a98fbc5000f46b3c30e4fd977feb7e88192faf6fa796b39e6a950eb63fe79bbc058d07bb6a56cbf8b8f7ff540012e66b19c43912ca0e5a9e2e8f54cdd14fd46aa458c39da1d41b53ba79f82f81111682cf74976e46a46226248cc618d2fa19f0cd78ac8641ef4df76453004b8e70006570bc7200000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa710000000001c5bad80141555756000000000006cca0cd0000271014ce3c6d1a13b1a478d541e35c4ef1f173c3dede01005500e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43000003feab9141c00000000073b14f40fffffff8000000006570bc72000000006570bc71000003ffb97079e000000000560a95640a9f087dfe219838720776216dd0dc700886d824e34c8859faf965f7d1295ba21e31b30c8afb66a256803f454c8b33c383ec5e25a99736e7e4e8ef0859e6a2971507b0c06d11998c885af67e9828204ede1c3970e5206e546d4bf5c603d96dcfac78de41a4dd877d9db79df2a321f63389c6991f0ce963785137861310d2077fa500fe7d48f44b2a5fc0d65af67a39b5a97208baf62d816ade0ab2c66ef6ec8366b64f3a9227e91af433335743c7adb6ea642106a730debd9aeccbcc89b47e746617be6e89399d264b
cost: 596000
epoch: "2.4"
File renamed without changes.
189 changes: 189 additions & 0 deletions deployments/v1/default.testnet-plan.yaml

Large diffs are not rendered by default.

0 comments on commit 1e066ed

Please sign in to comment.