@@ -84,6 +84,10 @@ npx hardhat kms:deploy-impl --network test
8484cast send $KMS_CONTRACT_ADDRESS " upgradeTo(address)" " NEW_IMPL_ADDRESS" \
8585 --private-key $PRIVATE_KEY --rpc-url $RPC_URL --gas-limit 500000
8686
87+ # Note: Existing KMS proxy deployments can be upgraded in-place using the steps above.
88+ # This release only adds optional app boot TCB checks in DstackApp and keeps the KMS
89+ # storage layout unchanged, so no initializer is required for the KMS upgrade.
90+
8791# Verify upgrade success
8892cast storage $KMS_CONTRACT_ADDRESS 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc --rpc-url $RPC_URL
8993# Should show the new implementation address
@@ -181,18 +185,18 @@ cast send $KMS_CONTRACT_ADDRESS "removeKmsDevice(bytes32)" \
181185
182186``` bash
183187# kms:create-app - Deploy and register DstackApp in single transaction
184- cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bytes32,bytes32)" \
185- " $DEPLOYER_ADDRESS " false true \
188+ cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)" \
189+ " $DEPLOYER_ADDRESS " false false true \
186190 " 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
187191 " 0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321" \
188192 --private-key $PRIVATE_KEY --rpc-url $RPC_URL
189- # Parameters: (owner, disableUpgrades, allowAnyDevice, initialDeviceId, initialComposeHash)
193+ # Parameters: (owner, disableUpgrades, requireTcbUpToDate, allowAnyDevice, initialDeviceId, initialComposeHash)
190194# Use 0x0000...0000 for empty device/hash values
191- # To decode return: cast abi-decode "deployAndRegisterApp(address,bool,bool,bytes32,bytes32)(address,address)" RETURN_DATA
195+ # To decode return: cast abi-decode "deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)(address,address)" RETURN_DATA
192196
193197# Example with no initial data:
194- cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bytes32,bytes32)" \
195- " $DEPLOYER_ADDRESS " false true \
198+ cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)" \
199+ " $DEPLOYER_ADDRESS " false false true \
196200 " 0x0000000000000000000000000000000000000000000000000000000000000000" \
197201 " 0x0000000000000000000000000000000000000000000000000000000000000000" \
198202 --private-key $PRIVATE_KEY --rpc-url $RPC_URL
@@ -379,7 +383,7 @@ cast abi-decode "kmsAllowedAggregatedMrs(bytes32)(bool)" RETURN_DATA
379383cast abi-decode " isAppAllowed((address,bytes32,address,bytes32,bytes32,bytes32,bytes32,string,string[]))(bool,string)" RETURN_DATA
380384
381385# Decode factory deployment response
382- cast abi-decode " deployAndRegisterApp(address,bool,bool,bytes32,bytes32)(address,address)" RETURN_DATA
386+ cast abi-decode " deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)(address,address)" RETURN_DATA
383387```
384388
385389### Get Contract Information
@@ -459,7 +463,7 @@ cast send $KMS_CONTRACT_ADDRESS "addKmsAggregatedMr(bytes32)" "0x..." \
459463 --private-key $PRIVATE_KEY --rpc-url $RPC_URL
460464
461465# 3. Users can now deploy apps via factory immediately!
462- cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bytes32,bytes32)" \
466+ cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)" \
463467 " $USER_ADDRESS " false true " 0x..." " 0x..." \
464468 --private-key $USER_PRIVATE_KEY --rpc-url $RPC_URL
465469```
@@ -485,7 +489,7 @@ cast send $KMS_CONTRACT_ADDRESS "addKmsAggregatedMr(bytes32)" "0x..." \
485489 --private-key $PRIVATE_KEY --rpc-url $RPC_URL
486490
487491# 5. Users can now deploy apps via factory
488- cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bytes32,bytes32)" \
492+ cast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)" \
489493 " $USER_ADDRESS " false true " 0x..." " 0x..." \
490494 --private-key $USER_PRIVATE_KEY --rpc-url $RPC_URL
491495```
@@ -547,7 +551,7 @@ mycast send $APP_AUTH_ADDRESS "addDevice(bytes32)" \
547551 " 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
548552
549553# Example: Factory deployment
550- mycast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bytes32,bytes32)" \
554+ mycast send $KMS_CONTRACT_ADDRESS " deployAndRegisterApp(address,bool,bool,bool, bytes32,bytes32)" \
551555 " $DEPLOYER_ADDRESS " false true \
552556 " 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
553557 " 0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321"
@@ -557,4 +561,4 @@ mycast storage $KMS_CONTRACT_ADDRESS 0x360894a13ba1a3210667c828492db98dca3e2076c
557561
558562# Example: Upgrade contract
559563mycast send $KMS_CONTRACT_ADDRESS " upgradeTo(address)" " NEW_IMPL_ADDRESS" --gas-limit 500000
560- ```
564+ ```
0 commit comments