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

fix: populate transaction trace error field #3627

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

cjeva10
Copy link
Contributor

@cjeva10 cjeva10 commented Jul 6, 2023

Follow up for #3611

@cjeva10 cjeva10 requested a review from mattsse as a code owner July 6, 2023 13:16
@onbjerg onbjerg changed the title populate transaction trace error field fix: populate transaction trace error field Jul 6, 2023
@onbjerg onbjerg added the A-rpc Related to the RPC implementation label Jul 6, 2023
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #3627 (7586357) into main (6347aac) will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

Impacted Files Coverage Δ
crates/revm/revm-inspectors/src/tracing/types.rs 0.00% <0.00%> (ø)

... and 8 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.96% <0.00%> (+<0.01%) ⬆️
unit-tests 64.11% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 26.40% <ø> (ø)
blockchain tree 81.25% <ø> (ø)
pipeline 86.69% <ø> (ø)
storage (db) 73.48% <ø> (ø)
trie 94.66% <ø> (ø)
txpool 49.73% <ø> (+0.61%) ⬆️
networking 77.91% <ø> (+0.01%) ⬆️
rpc 58.04% <ø> (-0.01%) ⬇️
consensus 63.35% <ø> (-0.15%) ⬇️
revm 34.89% <0.00%> (-0.01%) ⬇️
payload builder 6.83% <ø> (ø)
primitives 88.25% <ø> (-0.02%) ⬇️

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm!

what we need to improve is error messages here:

/// Returns the error message if it is an erroneous result.
pub(crate) fn as_error(&self) -> Option<String> {
self.is_error().then(|| format!("{:?}", self.status))
}

because rn we will return Revert but we'd like to return "Reverted", so ne need a custom convert,
not sure about the other variants, but we should at least handle the revert variant

@mattsse mattsse added this pull request to the merge queue Jul 6, 2023
Merged via the queue into paradigmxyz:main with commit 350f1a1 Jul 6, 2023
@onbjerg onbjerg added the C-bug An unexpected or incorrect behavior label Jul 11, 2023
@cjeva10 cjeva10 deleted the populate-trace-error branch July 20, 2023 21:23
@cjeva10 cjeva10 restored the populate-trace-error branch July 20, 2023 21:23
@cjeva10 cjeva10 deleted the populate-trace-error branch July 20, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants