Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

split transaction logging - #9239

Merged
huangminghuang merged 8 commits into
developfrom
transaction-logging
Jun 25, 2020
Merged

huangminghuang merged 8 commits into
developfrom
transaction-logging

Conversation

@huangminghuang

@huangminghuang huangminghuang commented Jun 23, 2020 •

Copy link
Copy Markdown
Contributor

Change Description

This PR splits the transaction_tracing logger into transaction_success_tracing and transaction_failure_tracing loggers; in addition, it adds logging statement for failed signature condition.

Change Type

Select ONE

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

transaction_tracing logger is removed

The following two loggers are added

  • transaction_success_tracing - detailed log that emits successful verdicts from relay nodes on the P2P network.
  • transaction_failure_tracing - detailed log that emits failed verdicts from relay nodes on the P2P network.

@huangminghuang
huangminghuang requested a review from heifner June 24, 2020 13:39
@huangminghuang
huangminghuang requested a review from heifner June 25, 2020 13:21
Comment thread plugins/net_plugin/net_plugin.cpp Resolved
fc::optional<transaction_id_type> trx_id;
fc::raw::unpack( ds, trx_id );
if( trx_id ) {
if (trx_in_progress_sz > def_max_trx_in_progress_size) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

needs the exact same block of code before line 2649, except you will replace *trx_id with ptr->id(). This will make sure that we check the max trx when the optional trx_id is not present. This would be similar to the trx_message_v0_which case, where we have to read in the complete transaction to be able to calculate the transaction's id.

snprintf(reason, 72, "Dropping trx, too many trx in progress %lu bytes", trx_in_progress_sz);
my_impl->producer_plug->log_failed_transaction(*trx_id, reason);
return true;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also, at line 2646, change EOS_ASSERT(...) to:
if (trx_id && ptr && *trx_id != ptr->id()) {
...->log_failed_trasaction(ptr->id(), "... Provided trx_id does not ..."
EOS_ASSERT(false,...)
}

}

Comment thread plugins/net_plugin/net_plugin.cpp Outdated

if (ptr && trx_id && *trx_id != ptr->id()) {
my_impl->producer_plug->log_failed_transaction(*trx_id, "Provided trx_id does not match provided packed_transaction");
EOS_ASSERT(true, transaction_id_type_exception,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

false

@huangminghuang
huangminghuang requested a review from heifner June 25, 2020 17:42
@heifner

heifner commented Jun 25, 2020

Copy link
Copy Markdown
Contributor

LGTM

@huangminghuang
huangminghuang merged commit 840dbe1 into develop Jun 25, 2020
@brianjohnson5972
brianjohnson5972 deleted the transaction-logging branch November 21, 2020 15:10
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.

3 participants