# Secret Network v1.9 SecretVRF Upgrade
This proposal recommends that the chain undergo a software upgrade to version v1.9 of the Secret Network codebase on secret-4 block **8,861,800**. The estimated time for the upgrade is **Tuesday, May 16, 2023, at ~2pm UTC**.
Since block times can vary significantly, we advise monitoring the chain for a more precise upgrade time. ETA monitor: [mintscan.io/secret/blocks/8861800](
https://www.mintscan.io/secret/blocks/8861800 ).
## Upgrade Highlights
- New Feature: SecretVRF
- Randomness injection for secret contracts.
- `env.block.random` is now available in contracts.
- Eliminates the need for contracts to bootstrap their own entropy pool.
- Unique for every contract call.
- Useful in lotteries, gaming, secure authentication protocols, protocols where unpredictable outcomes are essential for fairness and security, and much more.
- For more infomation on how to use this feature, see the docs [here](
https://docs.scrt.network/secret-network-documentation/development/development-concepts/secret-vrf-on-chain-randomness ) and example contracts [here](
https://github.com/scrtlabs/random-ibc-example )
- New Feature: `FinalizeTx`.
- `CosmosMsg::FinalizeTx` is now available as an output message in contracts.
- Contracts can force the transaction to finalize at a certain point, otherwise revert.
- Example: protect against sandwich attacks and potential transaction rollbacks.
- Example: protect against cheating in gaming applications, where a malicious player could try to rollback a transaction in which they lost.
- See Usage example [here](
https://github.com/scrtlabs/SecretNetwork/blob/a3edd6669/cosmwasm/contracts/v1/compute-tests/test-compute-contract/src/contract.rs )
- IBC: Updated ibc-go from v3.4.0 to v4.3.0.
- New IBC Feature: Added the packet-forward-middleware (PFM) by Strangelove.
- Other chains would be able to more easily route SCRT in the interchain. For example, sending SCRT from Osmosis to Hub now becomes a single transaction from `Osmosis -> Secret` rather than a transaction from `Osmosis -> Secret`, then a transaction from `Secret -> Hub`.
- See Usage example [here](
https://github.com/scrtlabs/secret.js/blob/002c369/test/ibc.test.ts )
- New IBC Feature: Added IBC Fee middleware.
- Creates a fee market for relaying IBC packets.
- Adds four new message types: `MsgPayPacketFee`, `MsgPayPacketFeeAsync`, `MsgRegisterCounterpartyPayee` and `MsgRegisterPayee`.
- `MsgPayPacketFee` can be used to pay a fee for relaying an IBC packet. In a transaction, it must come before the IBC packet is sent. See example [here](
https://github.com/scrtlabs/secret.js/blob/002c369/test/ibc.test.ts ).
- `MsgPayPacketFeeAsync` can be used to pay a fee for an IBC packet that was already sent. It must come before the packet's `MsgRecvPacket` is processed on the receiving chain.
- `MsgRegisterCounterpartyPayee` is used by relayers to register their payee on chain A for submitting `MsgRecvPacket` on chain B. This is a required one-time setup for each channel on both chains, as fees are paid on the sending chain only. See example [here](
https://github.com/scrtlabs/secret.js/blob/002c369/test/ibc.test.ts )
- `MsgRegisterPayee` is used by relayers to change their default payee on chain A for submitting `MsgAcknowledgement` and `MsgTimeout` on chain A. The default payee on chain A is the relayer's address. See example [here](
https://github.com/scrtlabs/secret.js/blob/002c369/test/ibc.test.ts ).
- New IBC Feature: Added IBC panic button.
- Quickly shuts down IBC in case of an emergency.
- Delegates the ability to shut down IBC to a single address, which is intended to be a multisig of various stakeholders in the network.
- This feature is turned off by default and can be turned on by a future param change proposal that also determines the account address that can shut down IBC.
- New Feature: Evaporate & Check Gas APIs by [@darwinzer0](
https://github.com/darwinzer0 ) & [blake-regalia](
https://github.com/blake-regalia )
- `deps.api.gas_evaporate(amount)` & `deps.api.check_gas()` are now available in contracts.
- Allows contract developers to create contracts that consume a constant amount of gas, independently of their code path. This
- Helps harden contracts against information leakage from the amount of gas consumed by a contract.
- See usage examples [here](
https://github.com/scrtlabs/SecretNetwork/blob/a3edd6669/cosmwasm/contracts/v1/compute-tests/evaporation/src/contract.rs ).
- Bug Fix: Fixed an issue where nodes would sometimes stop if failing to enter SGX enclave.
## Upgrade instructions
See [docs.scrt.network](
https://docs.scrt.network/secret-network-documentation/post-mortems-upgrades/upgrade-instructions/v1.9 ) for upgrade instructions.