-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Improve signature recovery #7721
Conversation
This reverts commit d4aca74.
… processing incoming transaction after signature recovery
…ansaction interface
…a with recovered keys
} CATCH_AND_CALL(next); | ||
} ); | ||
} | ||
}); | ||
} |
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 is the key performance change. As odd as this looks, it is demonstratively better than before. And it is not the switch back to producer thread pool. Either thread pool (chain or producer) showed same results. The difference is in passing in a next std::function
over calling future.wait()
.
auto after_sig_recovery = | ||
[self = this, trx, persist_until_expired, next{std::move(next)}]() mutable { | ||
app().post(priority::low, [self, trx{std::move(trx)}, persist_until_expired, next{std::move(next)}]() { | ||
self->process_incoming_transaction_async( trx, persist_until_expired, next ); |
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.
I don't know whether this matters, but next is being copied here.
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.
Yes it was. I tested a version where the lambda was mutable and it std::move
but didn't make any difference.
…eated as needed in apply_block
This reverts commit 32b8208.
@arhag ready for review. |
…tributes private.
Change Description
develop
branch approach of passing anext
function does not perform as well as just callingwait()
on the future.packed_transaction
instead oftransaction_metadata
.accept_transaction
to take apacked_transaction
instead oftransaction_metadata
.transaction_metadata
is now constructed with the recovered public keys and signature cpu usage.transaction_metadata
is now constructed withimplicit
andscheduled
const values set.transaction_metadata
is now immutable except for theaccepted
flag.transaction_metadata
construction is now restricted to static factory methodsstart_recover_keys
andcreate_no_recover_keys
.transaction_metadata
inapply_block
if a previously applied block with cachedtransaction_metadata
.Consensus Changes
API Changes
eosio::chain::plugin_interface::incoming::channels::transaction
changed fromtransaction_metadata_ptr
topacked_transaction_ptr
eosio::chain::plugin_interface::incoming::methods::transaction_async
changed fromvoid(const transaction_metadata_ptr&, bool, next_function<transaction_trace_ptr>), first_provider_policy>
tovoid(const packed_transaction_ptr&, bool, next_function<transaction_trace_ptr>), first_provider_policy>
Documentation Additions