ecadlabs / signatory

Signatory - A Tezos Remote Signer for signing block-chain operations with private keys using YubiHSM, AWS, GCP, Ledger's or Azure Key Vault
https://signatory.io
Apache License 2.0
62 stars 18 forks source link

Add support for 'Vdf_revelation' and 'Increase_paid_storage' operations introduced with Kathmandu protocol #237

Closed danielelisi closed 2 years ago

danielelisi commented 2 years ago

According to the K protocol docs, 2 new operations will be introduced with this upgrade https://tezos.gitlab.io/protocols/014_kathmandu.html#operation-receipts

We want to start supporting these operations in Signatory before Mainnet upgrades to Kathmandu.

Vdf_revelation

introduced for VDF revelation. See Randomness generation for more details.

Increase_paid_storage

Enables a payer to increase the paid storage of a smart contract by some bytes amount. To increase a contract paid storage via tezos client we can use the following command

$ tezos-client increase the paid storage of <contract> by <amount> bytes from <payer>

Here is an example output

$ tezos-client increase the paid storage of increase_storage_test by 1 bytes from falpha_baker
Node is bootstrapped.
Estimated gas: 1000 units (will add 0 for safety)
Estimated storage: no bytes added
Operation successfully injected in the node.
Operation hash is 'oniyXJPFXgCEBVhVmv875ntRYjSVikRE7odATZzb8BegBbsjrF7'
Waiting for the operation to be included...
Operation found in block: BKn2GpFu1hd2KFhHAiybotaK8VEXVv9KCoDQjag2VhgX3mX7DjN (pass: 3, offset: 1)
This sequence of operations was run:
  Manager signed operations:
    From: tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD
    Fee to the baker: ꜩ0.000347
    Expected counter: 12
    Gas limit: 1000
    Storage limit: 0 bytes
    Balance updates:
      tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD ... -ꜩ0.000347
      payload fees(the block proposer) ....... +ꜩ0.000347
    Increase paid storage:
      Bytes: : 1
      From: tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD
      To: KT1SqUeay8FiBfukVJHsLbiN3n8BZeo4BBwd
      This paid storage increase was successfully applied
      Balance updates:
        tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD ... -ꜩ0.00025
        storage fees ........................... +ꜩ0.00025
      Consumed gas: 1000
AbineshECAD commented 2 years ago

PR: https://github.com/ecadlabs/signatory/pull/250

jevonearth commented 2 years ago

Implemented