-
Notifications
You must be signed in to change notification settings - Fork 73
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
introduce new read-only transaction RPC end point #558
Conversation
…on non-aggregate types
libraries/chain/apply_context.cpp
Outdated
@@ -289,7 +289,7 @@ void apply_context::require_recipient( account_name recipient ) { | |||
schedule_action( action_ordinal, recipient, false ) | |||
); | |||
|
|||
if (auto dm_logger = control.get_deep_mind_logger()) { | |||
if (auto dm_logger = control.get_deep_mind_logger(); dm_logger && !trx_context.is_read_only()) { |
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.
Instead of repeating this pattern many times, why not create a new member function on transaction_context like:
deep_mind_handler* get_dm_logger() {
return is_read_only() ? nullptr : control.get_deep_mind_logger();
}
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.
Thanks for your suggestion. Since read-only is an exception to deep-mind logging, it helps to understand the code by specifically showing when we don't do deep-mind logging.
…lify code, do not allow non-zero delay_sec; do not do validate_expiration and validate_tapo; add back elapsed and net_usage to trace
…_only_mode from stuck, add more unit tests
…ctions; add tests for elpased and net_usage for read-only transactions
…action_cpu_usage for read-only transactions
…read-only transactions
…o, and do not use _max_read_only_transaction_time_ms as it is not thread-safe when called from net plugin
…d read-only transactions
…ransient directly to indicate doing deep mind logging or not
… for dry-run or read-only transactions
…ling deferred transaction host functions
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 approved. But please fix the three remaining issues (two error strings, and the comments repeated at four different lines) before merging.
…cheduling/cacelling deferred transactions
Resolved #440
This PR introduces a new read-only transaction RPC end point. Major features are
send_read_only_transaction
push transaction
option--read
for pushing read-only transactionpush action
option--read
for pushing read-only actioncleos
Please note, the Chainbase submodule commit will be updated after corresponding Chainbase PR AntelopeIO/chainbase#4 is merged.