IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
43 stars 15 forks source link

`calculate-min-fee` with signed transaction body #543

Closed felix-lipski closed 1 month ago

felix-lipski commented 10 months ago

The calculate-min-fee command should support the following scenarios:

  1. The user submits an unsigned tx body specifying the number of byron/shelley witnesses they desire.

    • In the cli we construct dummy witnesses (byron if needed or shelley or both) to construct a "bogus" tx and call getMinFeeTx. We return only the fee in this case otherwise the users will have to remove the bogus witnesses if we returned the resulting tx. Constructing the dummy witnesses will allow us to avoid implementing something like calculateByronWitnessFees.
  2. The user submits a signed tx or an unsigned tx body along with the signing keys they intend to validate the tx with.

    • In this case we should return the re-signed transaction. The transaction has to be re-signed after the minimum fee is updated and the user will receive a valid tx they can immediately submit.
    • Consider returning an error if the number of witnesses in the signed tx does not equal the number of signing keys (0 supplied signing keys is fine and is actually the third scenario).
  3. The user submits a signed tx without the signing keys needed to validate the tx. We simply return the fee as we can't return a valid tx.

As referenced in this comment on PR#534

The first scenerio is currently being worked on/completed. This issue only pertains to the second and third scenerio.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

smelc commented 9 months ago

Not sure what we want to do with this one. The thread that started this stream of work got quite deep: https://github.com/IntersectMBO/cardano-cli/pull/534

cc @Jimbo4350

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.