Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(axelarnet): remove unused TxID parameter from ConfirmDepositRequest #1218

Merged
merged 5 commits into from
Jan 27, 2022

Conversation

jack0son
Copy link
Contributor

@jack0son jack0son commented Jan 15, 2022

Description

TxID is not necessary because ConfirmDeposit confirms the full available balance rather than a specific transaction.

This PR removes the TxID parameter from the CLI command and the request message validation.

Todos

  • Unit tests
  • Manual tests
  • Documentation
  • Connect epics/issues
  • Tag type of change

Steps to Test

Expected Behaviour

Other Notes

burnerAddr, err := sdk.AccAddressFromBech32(args[2])
if err != nil {
return err
}

msg := types.NewConfirmDepositRequest(cliCtx.GetFromAddress(), txID, args[1], burnerAddr)
msg := types.NewConfirmDepositRequest(cliCtx.GetFromAddress(), nil, args[1], burnerAddr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the contructor so not to ask for this parameter, but do not remove the field from the protobuf

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, i almost forgot: mark the field as deprecated on the protobuf like this: https://github.com/axelarnetwork/axelar-core/blob/main/proto/axelarnet/v1beta1/tx.proto#L32

@jack0son jack0son force-pushed the fix/axelarnet-confirm-deposit-txid branch from 774a6be to 931a560 Compare January 16, 2022 02:55
@jack0son jack0son requested a review from jcs47 January 16, 2022 02:56
Comment on lines 31 to 34
bytes tx_id = 2 [
(gogoproto.customname) = "TxID",
deprecated = true
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bytes tx_id = 2 [
(gogoproto.customname) = "TxID",
deprecated = true
];
reserved 2; // tx_id was removed in v0.14

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest just removing it and reserving the field number for backward compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "tx_id" also be reserved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have reserved 2 at this stage

fix

remove txID from constructor and update rest endpoint

deprecate the txID field

remove txID from ConfirmDeposit message and reserve its proto index
@jack0son jack0son force-pushed the fix/axelarnet-confirm-deposit-txid branch from 474bcfc to b112e66 Compare January 25, 2022 21:35
@jack0son jack0son enabled auto-merge (squash) January 25, 2022 23:11
Copy link
Contributor

@jcs47 jcs47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you are gonna have to see whats wrong with the auto generated files.

@jack0son jack0son merged commit 7fc512a into main Jan 27, 2022
@jack0son jack0son deleted the fix/axelarnet-confirm-deposit-txid branch January 27, 2022 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants