Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

more debug info on BlockGasLimitReached exception log #5514

Merged
merged 1 commit into from
Mar 13, 2019
Merged

Conversation

winsvega
Copy link
Contributor

@winsvega winsvega commented Mar 6, 2019

when reading block gas limit reached log its unclear what are the expected values and why it is reached.
more debug info should help with debugging such exceptions

@winsvega winsvega requested a review from gumb0 March 6, 2019 13:37
@halfalicious halfalicious self-requested a review March 7, 2019 07:11
Copy link
Contributor

@halfalicious halfalicious 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 to me!

@gumb0
Copy link
Member

gumb0 commented Mar 7, 2019

What kind of error does this return in the end?

In general, I think error messages of RPC methods should be more user-friendly, without messy internals like boost.exception dumps

@winsvega
Copy link
Contributor Author

winsvega commented Mar 7, 2019

then perhaps it could be extended by verbosity level of debug?
like on first level it is just a notice message and on max level it is full exception info.

@gumb0
Copy link
Member

gumb0 commented Mar 7, 2019

I don't think log verbosity should control RPC output.

@gumb0
Copy link
Member

gumb0 commented Mar 7, 2019

Maybe output your message to log - and then look into aleth's log when you want to see debug info related to RPC call.

@halfalicious
Copy link
Contributor

What kind of error does this return in the end?

In general, I think error messages of RPC methods should be more user-friendly, without messy internals like boost.exception dumps

Good point I agree with this since these errors will be displayed in response to functionally directly invoked by the end user.

@winsvega
Copy link
Contributor Author

winsvega commented Mar 7, 2019

Maybe output your message to log - and then look into aleth's log when you want to see debug info related to RPC call.

that is the issue. the log contain not enough info.

the full message looks like:

Block gas limit reached: /home/wins/Ethereum/cpp-ethereum/libethcore/SealEngine.cpp(160): Throw in function virtual void dev::eth::SealEngineFace::verifyTransaction(dev::eth::ImportRequirements::value, const dev::eth::TransactionBase&, const dev::eth::BlockHeader&, const u256&) const
Dynamic exception type: boost::exception_detail::clone_impl<dev::eth::BlockGasLimitReached>
[dev::tag_comment*] = _gasUsed + (bigint)_t.gas() > _header.gasLimit()
[dev::tag_required*] = 9990236
[dev::tag_got*] = 10000000

@gumb0
Copy link
Member

gumb0 commented Mar 7, 2019

I'm saying add a message to the log, but not to the RPC output

@codecov-io
Copy link

Codecov Report

Merging #5514 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5514      +/-   ##
==========================================
- Coverage   61.89%   61.89%   -0.01%     
==========================================
  Files         345      345              
  Lines       28734    28716      -18     
  Branches     3265     3265              
==========================================
- Hits        17786    17774      -12     
+ Misses       9778     9777       -1     
+ Partials     1170     1165       -5

@winsvega winsvega merged commit b52bb86 into master Mar 13, 2019
@axic axic deleted the moredebug branch May 15, 2019 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants