Skip to content

Allow resource fees exceeding u32::MAX #2314

@dmkozh

Description

@dmkozh

What problem does your feature solve?

Currently CLI returns an error if the resource fee exceeds u32::MAX. However, since protocol 23 resource fees up to i64::MAX are allowed by the protocol, so this error is no longer correct to return.

What would you like to see?

Instead of returning an error when the sum resource fee and inclusion fee exceeds u32:MAX we should do the following:

  • Leave the resource fee as is
  • Set the fee field of transaction envelope to 0
  • Sign the envelope
  • Wrap the envelope into fee bump envelope, with the same source account as for the original transaction source account
  • Set the fee of fee bump envelope to resource_fee + 2 * inclusion_fee
  • Sign the fee bump envelope

What alternatives are there?

Potentially CLI could just inform users that they should use the fee bump envelope, but that's not a great UX. At the very least, there should be a way for building a fee bump transaction via CLI, but ideally this should be done automatically, as described above.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo (Ready for Dev)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions