Is your feature request related to a problem? Please describe.
Currently the result when sending a transaction via the api (using TransactionFlow) the result is given as TransactionFlowResult and contains the following information:
The only useful information in this result at this moment is to know if the transaction is a success, of which we aren't even sure that it even is a success.
When a transaction is sent to a node using the TransactionFlow method, the node sets the current roundNum at that point as a result, while the transaction has not been processed yet.
After that a transaction is checked using the checkTransaction function, which is a check on the node the transaction was sent to. It checks for some basic things, such as sufficient balance, enough fee and a correct signature. When the transaction passes these tests, the node checks if there is anything related to smartcontracts in the transaction. When there is no smart contract data inside the transaction, it passes the transaction to dumb_transaction_flow (https://github.com/CREDITSCOM/node/blob/dev/api/src/apihandler.cpp line 842/843).
The dumb_transaction_flow sends the transaction into the network and immediately returns a success, containing both the 'success' message and the signature in hexadecimals. But is it really a success? If so, I'd like to see some more and accurate information regarding the transaction.
Describe the solution you'd like
I'd like to see a change in the TransactionFlowResult. First of all I should receive the result after the transaction has succesfully been processed in the network and not just on a single node as there is a small chance it fail due to whatever reason.
Next to that I'd like to see the transaction ID returned as well. It might be an idea to use the SealedTransaction for that.
struct SealedTransaction {
1: TransactionId id
2: Transaction trxn
}
struct TransactionId
{
1: i64 poolSeq
2: i32 index
}
Describe alternatives you've considered
It's possible to retrieve more information about the transaction after it's processed succesfully while retreiving transactions using TransactionsGet, but that takes time and creates additional API calls to a node.
Additional context
In my opinion this change is good for any developer that uses/want to use the Credits blockchain. Not just developers, but also exchanges can easily display transaction ids this way, making sure deposits/withdrawals are a success.
Is your feature request related to a problem? Please describe. Currently the result when sending a transaction via the api (using
TransactionFlow
) the result is given asTransactionFlowResult
and contains the following information:The only useful information in this result at this moment is to know if the transaction is a success, of which we aren't even sure that it even is a success.
When a transaction is sent to a node using the
TransactionFlow
method, the node sets the currentroundNum
at that point as a result, while the transaction has not been processed yet. After that a transaction is checked using thecheckTransaction
function, which is a check on the node the transaction was sent to. It checks for some basic things, such as sufficient balance, enough fee and a correct signature. When the transaction passes these tests, the node checks if there is anything related to smartcontracts in the transaction. When there is no smart contract data inside the transaction, it passes the transaction todumb_transaction_flow
(https://github.com/CREDITSCOM/node/blob/dev/api/src/apihandler.cpp line 842/843).The
dumb_transaction_flow
sends the transaction into the network and immediately returns a success, containing both the 'success' message and the signature in hexadecimals. But is it really a success? If so, I'd like to see some more and accurate information regarding the transaction.Describe the solution you'd like I'd like to see a change in the
TransactionFlowResult
. First of all I should receive the result after the transaction has succesfully been processed in the network and not just on a single node as there is a small chance it fail due to whatever reason.Next to that I'd like to see the transaction ID returned as well. It might be an idea to use the
SealedTransaction
for that.Describe alternatives you've considered It's possible to retrieve more information about the transaction after it's processed succesfully while retreiving transactions using
TransactionsGet
, but that takes time and creates additional API calls to a node.Additional context In my opinion this change is good for any developer that uses/want to use the Credits blockchain. Not just developers, but also exchanges can easily display transaction ids this way, making sure deposits/withdrawals are a success.