-
Notifications
You must be signed in to change notification settings - Fork 673
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: include txid in more failure logs #4396
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4396 +/- ##
============================================
- Coverage 56.00% 26.37% -29.63%
============================================
Files 465 404 -61
Lines 336186 293090 -43096
============================================
- Hits 188266 77290 -110976
- Misses 147920 215800 +67880 ☔ View full report in Codecov by Sentry. |
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.
Hey, we don't open PRs into master
directly unless it's a hotfix or a release. Can you instead open this against develop
?
Apologies, forgot to switch 👍🏻 Will update |
75dbfbd
to
94b5ce8
Compare
Just make sure CI passes |
Right now tests are failing because some auto-generated contract names are too long. e.g. a contract name from setting up the test observer; @jbencin any ideas on how to go about this, or point me to the correct code. e.g. if the exact string isn't important, we can slice it to the max contract length, or something similar. |
@jcnelson @janniks I found the issue. guarded_string!(
ContractName,
"ContractName",
CONTRACT_NAME_REGEX,
MAX_STRING_LEN,
RuntimeErrorType,
RuntimeErrorType::BadNameValue
);
fn consensus_serialize<W: Write>(&self, fd: &mut W) -> Result<(), codec_error> {
if self.as_bytes().len() < CONTRACT_MIN_NAME_LENGTH as usize
|| self.as_bytes().len() > CONTRACT_MAX_NAME_LENGTH as usize
{
// Error!
}
// ...
}
Proposed solutions
|
# Conflicts: # stackslib/src/chainstate/stacks/db/transactions.rs
Updated the test helpers to not allow invalid contract name generation. (Capping at |
# Conflicts: # stackslib/src/net/mod.rs
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.
🎉
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Adds
txid
to more failure logs for better interpretability of logs in production.Additional info (benefits, drawbacks, caveats)
Can be used for better understanding what happened to a tx given a txid and logs.
Checklist
Required documentation changes (e.g.,docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)New clarity functions have corresponding PR inclarity-benchmarking
repoNew integration test(s) added tobitcoin-tests.yml