-
Notifications
You must be signed in to change notification settings - Fork 108
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
refactor: outboud vote #1886
refactor: outboud vote #1886
Conversation
!!!WARNING!!! Be very careful about using Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203 Pay extra attention to the way |
return nil | ||
} | ||
|
||
func (k Keeper) FundStabiltityPool(ctx sdk.Context, cctx *types.CrossChainTx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (k Keeper) FundStabiltityPool(ctx sdk.Context, cctx *types.CrossChainTx) { | |
func (k Keeper) FundStabilityPool(ctx sdk.Context, cctx *types.CrossChainTx) { |
|
||
func (k Keeper) FundStabiltityPool(ctx sdk.Context, cctx *types.CrossChainTx) { | ||
// Fund the gas stability pool with the remaining funds | ||
if err := k.FundGasStabilityPoolFromRemainingFees(ctx, *cctx.GetCurrentOutTxParam(), cctx.GetCurrentOutTxParam().ReceiverChainId); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is msg.OutTxChain
(used before refactor) equal to cctx.GetCurrentOutTxParam().ReceiverChainId)
in all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pending nonces is set using the receiver chain ID
https://github.com/zeta-chain/zeta-node/blob/75580e7726f421b40be995f3a17de1cce28e338a/x/crosschain/keeper/cctx_utils.go#L105-L118
and the client uses that to query and process outbounds .
https://github.com/zeta-chain/zeta-node/blob/75580e7726f421b40be995f3a17de1cce28e338a/zetaclient/zetacore_observer.go#L145-L149 ,
it should be the same , I can however add an additional check in the outbound message to be safe
* refactor inbound vote * add unit tests for ProcessZEVMDeposit * creating mocking functions for test refactor * add tests for Process message passing * move cointype to cctx struct and refactor tests to accomodate the change * add defer to recover from panic if config is already set * add more unit tests * add validate * add validate function for cctx * add validate function for cctx * add validate unit tests * add migration test * set module version * fix unit tests * remove unnecessary test * update upgrade docker file * generate files * modify logs * ignore address validation for zetachain * ignore address validation for zetachain * ignore tx hash check * refactor: outboud vote (#1886) * remove changes to cctx struct * modify changelog * add tests for types package * add comments * resolve comments * modify comments based on suggestions * add error message for add revert * replace broken eth rpc * directly modify fungible state in SetupStateForProcessLogsZetaSent * set withdrawals to pending outbound * append status message if not empty * Update changelog.md Co-authored-by: Lucas Bertrand <[email protected]> * add issue #1951 * adjust changelog --------- Co-authored-by: Lucas Bertrand <[email protected]>
Description
MsgVoteOnObservedOutboundTxResponse
, to break it down into smaller functionsCloses:#1801
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.
Checklist: