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

14166 add l1 fees #14621

Merged
merged 2 commits into from
May 17, 2024
Merged

14166 add l1 fees #14621

merged 2 commits into from
May 17, 2024

Conversation

endulab
Copy link
Contributor

@endulab endulab commented May 7, 2024

What does the PR do

All fees (suggested fees, l1 fee, gas units) are computed in 1 status-go call.
Suggested fees contains correct l1 fee.
We display the cost with included l1 fee.

Related status-go pr

@endulab endulab self-assigned this May 7, 2024
@status-im-auto
Copy link
Member

status-im-auto commented May 7, 2024

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 93e919e #1 2024-05-07 08:59:32 ~6 min tests/nim 📄log
✔️ 93e919e #1 2024-05-07 09:01:11 ~7 min macos/aarch64 🍎dmg
✔️ 93e919e #1 2024-05-07 09:04:15 ~10 min macos/x86_64 🍎dmg
✔️ 93e919e #1 2024-05-07 09:04:29 ~11 min tests/ui 📄log
✔️ 93e919e #1 2024-05-07 09:10:27 ~17 min linux/x86_64 📦tgz
✔️ 93e919e #1 2024-05-07 09:17:38 ~24 min windows/x86_64 💿exe
✔️ 93e919e #2 2024-05-16 15:44:20 ~6 min tests/nim 📄log
✔️ 93e919e #2 2024-05-16 15:45:11 ~7 min macos/aarch64 🍎dmg
✔️ 93e919e #2 2024-05-16 15:46:24 ~9 min macos/x86_64 🍎dmg
✔️ 93e919e #2 2024-05-16 15:49:20 ~11 min tests/ui 📄log
✔️ 93e919e #2 2024-05-16 15:55:13 ~17 min linux/x86_64 📦tgz
✔️ 93e919e #2 2024-05-16 16:01:42 ~24 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 53cf65e #3 2024-05-16 16:13:06 ~6 min tests/nim 📄log
✔️ 53cf65e #3 2024-05-16 16:13:08 ~6 min macos/aarch64 🍎dmg
✔️ 53cf65e #3 2024-05-16 16:15:31 ~9 min macos/x86_64 🍎dmg
✔️ 53cf65e #3 2024-05-16 16:18:07 ~11 min tests/ui 📄log
✔️ 53cf65e #3 2024-05-16 16:22:50 ~16 min linux/x86_64 📦tgz
✔️ 53cf65e #3 2024-05-16 16:29:12 ~22 min windows/x86_64 💿exe
✔️ 8e87fc9 #4 2024-05-17 08:04:44 ~5 min macos/aarch64 🍎dmg
✔️ 8e87fc9 #4 2024-05-17 08:05:24 ~6 min tests/nim 📄log
✔️ 8e87fc9 #4 2024-05-17 08:07:07 ~8 min macos/x86_64 🍎dmg
✔️ 8e87fc9 #4 2024-05-17 08:10:42 ~11 min tests/ui 📄log
✔️ 8e87fc9 #4 2024-05-17 08:14:51 ~16 min linux/x86_64 📦tgz
✔️ 8e87fc9 #4 2024-05-17 08:22:21 ~23 min windows/x86_64 💿exe

@@ -1083,13 +1080,15 @@ QtObject:
let (ethCurrency, fiatCurrency) = self.create0CurrencyAmounts()
return ComputeFeeArgs(ethCurrency: ethCurrency, fiatCurrency: fiatCurrency, errorCode: errorCode)

# Returns eth value with l1 fee included
proc computeEthValue(self:Service, gasUnits: int, suggestedFees: SuggestedFeesDto): float =
try:
let maxFees = suggestedFees.maxFeePerGasM
let gasPrice = if suggestedFees.eip1559Enabled: maxFees else: suggestedFees.gasPrice
Copy link
Contributor

Choose a reason for hiding this comment

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

This line looks misleading. I mean, how maxFeePerGasM can be used as gasPrice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For EIP-1559 maxFeePerGasM is the absolute maximum you are willing to pay per unit of gas to get your transaction included in a block. You are sure that you will not pay more than that.
So, I understand that you will pay no more than: gas* maxFeePerGasM
For legacy tx you just pay gas*gasPrice.
This is how I understand this.

error "Can't find suggested fees for chainId", chainId=chainId
return
return buildTransaction(parseAddress(addressFrom), 0.u256, $gasUnits,
if suggestedFees.eip1559Enabled: "" else: $suggestedFees.gasPrice, suggestedFees.eip1559Enabled,
Copy link
Contributor

Choose a reason for hiding this comment

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

@endulab gas price should not depend on eip1559 and should not be empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why gas price is needed for eip1559 tx?

@saledjenic
Copy link
Contributor

@endulab you're absolutely right, I overlooked something.

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

Looks good. Was there an issue for this or it's just a fix/update to the last one?

Also, is there a status-go PR too?

@endulab endulab linked an issue May 7, 2024 that may be closed by this pull request
@saledjenic saledjenic modified the milestone: 2.32.0 Beta May 7, 2024
@endulab
Copy link
Contributor Author

endulab commented May 8, 2024

@jrainville what do you mean?
The issue is here
Status-go pr is here

@endulab endulab force-pushed the 4351-community-token-refactoring branch from 4313176 to b895efa Compare May 16, 2024 14:20
Base automatically changed from 4351-community-token-refactoring to master May 16, 2024 15:37
…tions

There is only one status-go call for all fees: suggested fees, gas and l1 fee.

Issue #14166
@endulab endulab merged commit e82207c into master May 17, 2024
8 checks passed
@endulab endulab deleted the 14166-add-l1-fees branch May 17, 2024 08:26
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.

L1 fees for optimism communities call
4 participants