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

[3.2] Enhancement: Add unique error message for subjective billing in the transaction trace logs #719

Merged
merged 3 commits into from
Aug 10, 2022

Conversation

vladtr
Copy link
Contributor

@vladtr vladtr commented Jul 25, 2022

Decision was made not to change exception, just a message, in particular:

Functions affected: validate_account_cpu_usage, validate_account_cpu_usage_estimate and checktime()

It is suggested that error messages with the condition of subjective_billed_us > 0 should be amended with following string:

" with a subjective cpu of (${subjective} us)"

for example, in validate_account_cpu_usage message should be updated as following:

Old:
"estimated CPU time (${billed} us) is not less than the maximum billable CPU time for the transaction (${billable} us)"

New:
"estimated CPU time (${billed} us) is not less than the maximum billable CPU time for the transaction (${billable} us) with a subjective cpu of (${subjective} us)"

Provisions has been made to avoid unneeded duplication of messages in a code.

@vladtr vladtr changed the title Enhancement: Add unique error message for subjective billing in the transaction trace logs [3.2] Enhancement: Add unique error message for subjective billing in the transaction trace logs Jul 25, 2022
libraries/chain/transaction_context.cpp Outdated Show resolved Hide resolved
libraries/chain/transaction_context.cpp Outdated Show resolved Hide resolved
libraries/chain/transaction_context.cpp Show resolved Hide resolved
@heifner
Copy link
Member

heifner commented Aug 8, 2022

Can you update the PR description with example log messages.

@vladtr vladtr merged commit e8fb022 into main Aug 10, 2022
@vladtr vladtr deleted the subjective-billing-error-msg branch August 10, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Add unique error message for subjective billing in the transaction trace logs
2 participants