-
Notifications
You must be signed in to change notification settings - Fork 239
refactor(rpc): trace block reads #3952
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
Open
EgeCaner
wants to merge
12
commits into
main
Choose a base branch
from
refactor/rpc/trace-block-reads
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
79fac12
perf(rpc/v9): mirror v10 receipt and transaction value shapes
EgeCaner 30bfdeb
perf(rpc): return TransactionReceiptWithBlockInfo by value from recei…
EgeCaner 1cc4c0e
perf(rpc): return transactions by value from transaction handlers
EgeCaner 13de2cc
refactor(rpc): pass subscription receipts by pointer to avoid 168-byt…
EgeCaner f50ffaf
refactor(rpc): keep receipts off the trace path and pin block ids
EgeCaner 4ed1552
refactor(rpc): key the trace cache on felt.Felt
EgeCaner 171d41f
fix(rpc): don't report failed block reads as block-not-found
EgeCaner c61fb8c
fix(rpc): don't mask trace read failures as not-found
EgeCaner aecd3bd
remove todo comment
EgeCaner d4b7b8b
perf(core): read block transactions and receipts without cloning the …
EgeCaner eb7fbb0
fix(rpc): make traceTransaction report the right transaction and error
EgeCaner 8d92dbf
test(core): cover the combined transactions and receipts serializer
EgeCaner 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,20 +116,22 @@ func (p *PreConfirmed) GetTransactionStateDiffs() []*core.StateDiff { | |
|
|
||
| // TransactionByHash locates a transaction by hash in the block and returns | ||
| // it together with its index. Returns ErrTransactionNotFound when missing. | ||
| func (p *PreConfirmed) TransactionByHash(hash *felt.Felt) (core.Transaction, uint, error) { | ||
| func (p *PreConfirmed) TransactionByHash( | ||
| hash *felt.TransactionHash, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for detail attention and updating the types 🙏 |
||
| ) (core.Transaction, uint, error) { | ||
| for i, tx := range p.Block.Transactions { | ||
| if tx.Hash().Equal(hash) { | ||
| if tx.Hash().Equal((*felt.Felt)(hash)) { | ||
| return tx, uint(i), nil | ||
| } | ||
| } | ||
| return nil, 0, ErrTransactionNotFound | ||
| } | ||
|
|
||
| func (p *PreConfirmed) ReceiptByHash( | ||
| hash *felt.Felt, | ||
| hash *felt.TransactionHash, | ||
| ) (*core.TransactionReceipt, error) { | ||
| for _, receipt := range p.Block.Receipts { | ||
| if receipt.TransactionHash.Equal(hash) { | ||
| if receipt.TransactionHash.Equal((*felt.Felt)(hash)) { | ||
| return receipt, nil | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.