Skip to content

goal account renewpartkey does not separate transaction validity from partkey validity #3283

@fabrice102

Description

@fabrice102

Subject of the issue

Reported by mstuder on https://forum.algorand.org/t/goal-account-renewpartkey-cannot-construct-transaction-txn-validity-period-is-greater-than-protocol-max-txn-lifetime-1000/5333?u=fabrice

goal account renewpartkey uses roundLastValid both for transaction validity and partkey validity.
This means that partkeys renewed this way can only last at most 1000 rounds.

This can be seen in the arguments of:

func generateAndRegisterPartKey(address string, currentRound, lastValidRound uint64, fee uint64, leaseBytes [32]byte, dilution uint64, wallet string, dataDir string, client libgoal.Client) error {

Your environment

$ ./sandbox goal version -v
Version: [v1 v2]
GenesisID: sandnet-v1
Build: 3.1.0.nightly [relbeta3.1.0] (commit #83740b45+)

$ ./sandbox goal node status
Last committed block: 135
Time since last block: 3.5s
Sync Time: 0.0s
Last consensus protocol: future
Next consensus protocol: future
Round for next consensus protocol: 136
Next consensus protocol supported: true
Last Catchpoint:
Genesis ID: sandnet-v1
Genesis hash: SICdQ+nhcQiu13tqol+neGty9wdlrc0OA6Dlepn1ylE=

Steps to reproduce

  1. Start sandbox ./sandbox up
  2. List the accounts ./sandbox account list. Assume that account list contains VF5SXUXEST4NUMQYDV5KSNOWEESQEYIWY4PAVL4K6QAFD5EBT3LIK6RDJE
  3. Renew the above key:
./sandbox goal account renewpartkey --address VF5SXUXEST4NUMQYDV5KSNOWEESQEYIWY4PAVL4K6QAFD5EBT3LIK6RDJE --roundLastValid 10000000

Expected behaviour

It should work.

Actual behaviour

It fails:

$ ./sandbox goal account renewpartkey --address VF5SXUXEST4NUMQYDV5KSNOWEESQEYIWY4PAVL4K6QAFD5EBT3LIK6RDJE --roundLastValid 10000000
  Generated participation key for VF5SXUXEST4NUMQYDV5KSNOWEESQEYIWY4PAVL4K6QAFD5EBT3LIK6RDJE (Valid 80 - 10000000)
  Error registering keys - deleting newly-generated key file: /opt/data/sandnet-v1/VF5SXUXEST4NUMQYDV5KSNOWEESQEYIWY4PAVL4K6QAFD5EBT3LIK6RDJE.80.10000000.partkey
cannot construct transaction: txn validity period ( 80 to 10000000 ) is greater than protocol max txn lifetime 1000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions