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

improve(Dataworker): Remove 0-value refunds and 0-value empty-message slow fills #1957

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Dec 19, 2024

implements optimizations to UMIP-179

The goal here is protecting dataworker from performing extra computations where no on-chain state changes can happen, in the case of 0-value refunds and 0-value empty-message slow fills.

… slow fills

Implements optimizations to [UMIP-179](UMAprotocol/UMIPs#606)

The goal here is protecting dataworker from performing extra computations where no on-chain state changes can happen, in the case of 0-value refunds and 0-value empty-message slow fills.
@pxrl
Copy link
Contributor

pxrl commented Dec 19, 2024

+1. How do we synchronise this change on chain? I also have UMAprotocol/UMIPs#602 open - I got stalled on it because it also requires synchronisation - i.e. we need to identify when the transition would occur. We could do this by mainnet block number, or some change to the config store (bumping the VERSION field?).

@nicholaspai
Copy link
Member Author

+1. How do we synchronise this change on chain? I also have UMAprotocol/UMIPs#602 open - I got stalled on it because it also requires synchronisation - i.e. we need to identify when the transition would occur. We could do this by mainnet block number, or some change to the config store (bumping the VERSION field?).

I don't think we need any special logic to be honest, we likely don't need to run the dataworker code on any previous bundles anymore (I'll check no stuck leaves) and we can time this with a bundle with no 0-value refunds/0-value slow fills.

This way we can avoid the version bump

@nicholaspai nicholaspai marked this pull request as ready for review December 19, 2024 17:54
});
// Do not create slow fill leaves where the amount to transfer would be 0 and the message is empty
deposits
.filter((deposit) => deposit.inputAmount.gt(0) || !utils.isMessageEmpty(deposit.message))
Copy link
Member Author

Choose a reason for hiding this comment

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

can eventually use the isZeroValueDeposit function from the sdk once released

@nicholaspai nicholaspai requested a review from dohaki as a code owner December 19, 2024 21:49
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.

2 participants