-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Create USSLib #369
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
feat: Create USSLib #369
Conversation
# Breaking changes from existing `SpokePool` types of same name:
## RelayData
- `relayerFeePct`/ `realizedLpFeePct` replaced with `outputAmount`. The total fee is implied to be difference between `inputAmount` - `outputAmount` * `exchangeRateInputOutputTokens`
- Fill `expiryTimestamp`
- Exclusive `relayer`
## RelayExecution
- No `maxCount`
- `bool isSlowRelay` has been replaced with an enum `executionType` which is also added to the `SlowFill` struct so that creator of SlowFill leaf can specify whether this is a deposit refund or a normal slow fill. This is designed to be used by the executor to filter out slow fills with messages that it *shouldn't* execute versus deposit refunds that it *should* execute.
- Updatable deposit fields are optimistically set to:
- outputAmount
- recipient
- message
## SlowFill
- Allow slow fill creator to specify `executionType` to distinguish between deposit refunds and normal slow fills. Deposit refunds should have a `message` field set to help the `depositCallbackAddress` determine the deposit that was refunded but this should still be executed by executor. Typically executors won't execute slow fills with messages.
## FundsDeposited
- Adds `depositRefundCallbackAddress` to rest of `RelayData` params. Can be used by dataworker to create a deposit refund as a slow fill leaf.
# Optimizing compilation of contracts
Unfortunately, adding more functions to the `SpokePool` will push it over the contract bytecode size unless we decrease the optimizer. Not sure how to get around this since we want to maintain old functionality so we can only add to the size. I've bumped it down by 100x to the point where the compiler doesn't warn anymore
ACX-1672 Add new contract structs
There will be a new RelayData struct for new Deposits, which means that the relayHash for new fills will be different.
|
Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
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.
Looks awesome! Just a few questions.
Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com>
Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com>
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.
Responded to your responses!
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
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.
This scaffolding looks great! LGTM!
Breaking changes from existing
SpokePooltypes of same name:Fixes ACX-1672
RelayData
relayerFeePct/realizedLpFeePctreplaced withoutputAmount. The total fee is implied to be difference betweeninputAmount-outputAmount*exchangeRateInputOutputTokensexpiryTimestamp/fillDeadlinerelayerRelayExecution
maxCountOptimizing compilation of contracts
Unfortunately, adding more functions to the
SpokePoolwill push it over the contract bytecode size unless we decrease the optimizer. Not sure how to get around this since we want to maintain old functionality so we can only add to the size. I've bumped it down by 100x to the point where the compiler doesn't warn anymore