-
Notifications
You must be signed in to change notification settings - Fork 297
Add GetPendingTransactions query to shared model #1532
Conversation
docs/source/api/queries.rst
Outdated
:header: "Field", "Description", "Constraint", "Example" | ||
:widths: 15, 30, 20, 15 | ||
|
||
"Transactions", "an array of transactions for given account", "Committed transactions", "{tx1, tx2…}" |
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.
Ehm, maybe non-commited?
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.
Or "list of unsigned transactions or batches"
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.
Unsigned is not really a good word here. Becuase [valid] multisig txes either signed or haven't been sent yet
#ifndef IROHA_QUERY_EXECUTION_HPP | ||
#define IROHA_QUERY_EXECUTION_HPP | ||
|
||
#include "ametsuchi/block_query.hpp" | ||
#include "ametsuchi/wsv_query.hpp" | ||
#include "builders/protobuf/builder_templates/query_response_template.hpp" | ||
#include "builders/protobuf/builder_templates/blocks_query_template.hpp" |
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.
Is it used?
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.
You are right. This was redundant.
QueryProcessingFactory::executeGetPendingTransactions( | ||
const shared_model::interface::GetPendingTransactions &query, | ||
const shared_model::interface::types::AccountIdType &query_creator) { | ||
std::vector<shared_model::proto::Transaction> txs; |
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.
Always empty?
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 think it is temporary unless query execution is implemented. Please leave a comment about that
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.
Empty for now.
Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch).
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.
Sorry, haven't noticed that. Maybe you consider implementing mst? It's already implemented
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.
It is ok. Now we have common understanding. TODO about missing implementation is placed on a line below.
docs/source/api/queries.rst
Outdated
:header: "Field", "Description", "Constraint", "Example" | ||
:widths: 15, 30, 20, 15 | ||
|
||
"Transactions", "an array of transactions for given account", "Committed transactions", "{tx1, tx2…}" |
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.
Or "list of unsigned transactions or batches"
QueryProcessingFactory::executeGetPendingTransactions( | ||
const shared_model::interface::GetPendingTransactions &query, | ||
const shared_model::interface::types::AccountIdType &query_creator) { | ||
std::vector<shared_model::proto::Transaction> txs; |
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 think it is temporary unless query execution is implemented. Please leave a comment about that
Requested changes were applied.
@@ -192,6 +182,16 @@ of signatures required to consider a transaction signed. | |||
The default value is 1. | |||
Each account can link additional public keys and increase own quorum number. | |||
|
|||
Role |
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.
Could you please revert reordering, it differs from the pr aim
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.
Hmm. It was an intended change. Now the topics are sorted alphabetically if no other more valuable factors involved (e.g. logical composition).
Atomic Batch | ||
------------ | ||
|
||
All the transactions within an atomic batch should pass `stateful validation`_ for the batch to be applied to a ledger. |
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.
Please add sentence saying that order of transactions in atomic batch is preserved
be27b5a
to
1082bee
Compare
Now the query returns empty list of transactions. Later the behavior will be also implemented. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
1082bee
to
5b2edbb
Compare
…s#1532) This PR adds an interface of GetPendingTransactions query to shared model. Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch). Additionally, this pr provides documentation for the new query. It is a starting point for further development of GetPendingTransactions feature. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
This PR adds an interface of GetPendingTransactions query to shared model. Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch). Additionally, this pr provides documentation for the new query. It is a starting point for further development of GetPendingTransactions feature. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
This PR adds an interface of GetPendingTransactions query to shared model. Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch). Additionally, this pr provides documentation for the new query. It is a starting point for further development of GetPendingTransactions feature. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
This PR adds an interface of GetPendingTransactions query to shared model. Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch). Additionally, this pr provides documentation for the new query. It is a starting point for further development of GetPendingTransactions feature. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
This PR adds an interface of GetPendingTransactions query to shared model. Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch). Additionally, this pr provides documentation for the new query. It is a starting point for further development of GetPendingTransactions feature. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
This PR adds an interface of GetPendingTransactions query to shared model. Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch). Additionally, this pr provides documentation for the new query. It is a starting point for further development of GetPendingTransactions feature. Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Description of the Change
This PR adds an interface of GetPendingTransactions query to shared model.
Currently, the query does NOT perform actual information retrieving (will be implemented after appearing of transactions batches support in develop branch).
Additionally, this pr provides documentation for the new query.
Benefits
It is a starting point for further development of GetPendingTransactions feature.
Possible Drawbacks
None ?
Usage Examples or Tests
build everything and test everything, even bindings