Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Conversation

@fishseabowl
Copy link
Contributor

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Testing

What is the current behavior?

Resolves: #1368

What is the new behavior?

Replace hardcoded value in estimate_fee test with actual fee

Does this introduce a breaking change?

Other information

let invoke_transaction_2 =
BroadcastedTransaction::Invoke(BroadcastedInvokeTransaction { nonce: FieldElement::ONE, ..tx });

let simulations = rpc
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we execute it instead of doing the simulation? i think that would be a better test, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@apoorvsadana Thank you for your comment. Could you please clarify how to check the actual fee after execution? Additionally, does "executing it" refer to calling JsonRpcClient.add_invoke_transaction? Thanks

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can fetch the receipt to get the actual_fee. Yes, you need to call add_invoke_transaction

Copy link
Contributor Author

@fishseabowl fishseabowl Apr 7, 2024

Choose a reason for hiding this comment

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

@apoorvsadana, Thank you for your help. do you know how long we should wait until MaybePendingTransactionReceipt gets the Receipt value?

In my local machine, waiting for 20 seconds works fine, estimate_fee equals actual_fee(0xf0).

However, in the rpc-tests, it fails. After I changed wait time to 200 seconds, it still failed.

In another case, after adding PendingReceipt to match arm, it fails in rpc-tests because PendingReceipt.actual_fee(0xdc) is slightly smaller than Receipt.actual_fee(0xf0).

It looks like there is no validate, the fee should be 0xd2(210), if validate is skipped, the fee should be 0xdc(220), with signature, the fee should be 0xf0(240).

fishseabowl and others added 2 commits April 7, 2024 10:17

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@fishseabowl fishseabowl requested a review from apoorvsadana April 7, 2024 16:40
fishseabowl and others added 5 commits April 8, 2024 21:08

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@tdelabro
Copy link
Contributor

blocked by #1573

We are going to wait a bit before rebasing and merging this one, okay?

@tdelabro tdelabro added the stuck Stuck because of some external factor label Apr 30, 2024
fishseabowl and others added 6 commits May 29, 2024 08:59

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@fishseabowl
Copy link
Contributor Author

@apoorvsadana Could you help to review this PR? Thanks

@codecov
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.22%. Comparing base (2e2d580) to head (583ff0f).
Report is 235 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1526      +/-   ##
==========================================
- Coverage   40.71%   31.22%   -9.49%     
==========================================
  Files          96       89       -7     
  Lines       11069     9190    -1879     
  Branches    11069     9190    -1879     
==========================================
- Hits         4507     2870    -1637     
+ Misses       6050     5855     -195     
+ Partials      512      465      -47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

github-actions bot commented Jul 5, 2024

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Jul 5, 2024
@tdelabro
Copy link
Contributor

tdelabro commented Aug 2, 2024

repository archived in favor of https://github.com/madara-alliance/madara

@tdelabro tdelabro closed this Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale stuck Stuck because of some external factor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev: Better estimate fee test

3 participants