This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 292
Remove hardcoded values in estimate_fee test #1526
Closed
fishseabowl
wants to merge
24
commits into
keep-starknet-strange:main
from
fishseabowl:1368_fee_test
Closed
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ca88be2
Remove hardcoding in estimated cost test
2363986
Remove useless assert
b103b55
Fix fmt issue
93b0516
Compare estimeate_fee with actual_fee in TransactionReceipt
cf6ba83
Merge branch 'main' into 1368_fee_test
fishseabowl 38cb523
Change invoke_transaction wait time to 200 seconds
9a8ff9a
Merge branch '1368_fee_test' of https://github.com/fishseabowl/madara…
51b5895
Add 20 secs waiting time to get_transaction_receipt
9743983
solve fmt issues
94b8f70
Add PendingReceipt match arm
760a685
Refactor estimate_fee transaction
97bfbb6
fixed fmt issues
f37280c
Wait for the InvokeTransactionReceipt to be ready to compare estimate…
98c466f
Merge branch 'main' into 1368_fee_test
fishseabowl 15d10f6
Merge branch 'main' into 1368_fee_test
fishseabowl eeaee0d
Merge branch 'main' into 1368_fee_test
fishseabowl a78431c
fix fmt issue
717e3d1
fix fmt issue
013140d
Merge branch 'main' into 1368_fee_test
fishseabowl 97acf38
Fix merge conflicts
e7364fd
Remove hardcode in estimate_fee rpc test
8bf2bb1
Fix cargo lint issues
f5d5188
Fix cargo lint issues
583ff0f
Merge branch 'main' into 1368_fee_test
fishseabowl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we execute it instead of doing the simulation? i think that would be a better test, wdyt?
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.
@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
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.
You can fetch the receipt to get the actual_fee. Yes, you need to call add_invoke_transaction
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.
@apoorvsadana, Thank you for your help. do you know how long we should wait until
MaybePendingTransactionReceipt
gets theReceipt
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).