-
Notifications
You must be signed in to change notification settings - Fork 285
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
fix(connector-quorum): runTransaction does not behave the same with different types of credentials #1098
Comments
@elenaizaguirre Does Quorum support the geth keychain? I'm foggy on the details but I think I read somewhere that it doesn't allow it (could be 100% wrong) |
@petermetz I think that is not the problem because adding gas parameter it works: const parameters = {
web3SigningCredential: gethCredential,
transactionConfig: {
from: gethCredential.ethAccount,
to: privateKeyCredential.ethAccount,
value: 10e7,
gas: 21000,
},
};
const res = await apiClient.apiV1QuorumRunTransaction(
parameters as RunTransactionRequest,
); Furthermore, the error is not thrown only when using geth keychain, it happens with private key too. |
@elenaizaguirre Oh my bad, I misunderstood then. Thank you for clalrifying! |
…dger-cacti#1098 Signed-off-by: AzaharaC <a.castano.benito@accenture.com>
…dger-cacti#1098 Signed-off-by: AzaharaC <a.castano.benito@accenture.com>
Signed-off-by: AzaharaC <a.castano.benito@accenture.com>
Function apiV1QuorumRunTransaction of cactus-plugin-ledger-connector-quorum does not behave the same with different types of credentials
Expected Behavior
We expect Quorum connector to accept the same arguments as a transaction to run apiV1QuorumRunTransaction function independently of the type of credential used for sign the transaction.
Current Behavior
Now, apiV1QuorumRunTransaction can run without gas argument of schema QuorumTransactionConfig only using authentication of type GethKeychainPassword.
Possible Solution
Look at the code for default values of transaction fields and remove them.
We might define required parameters in QuorumTransactionConfig schema (in openapi.json) and validate them with express-openapi-validator package at web services. Autogenerated QuorumTransactionConfig interface will be updated automatically.
Steps to Reproduce
Create a Web3SigningSchema of type CactusKeychainRef (linked to a keychain plugin) or PrivateKeyHex:
Call apiV1QuorumRunTransaction function with cactusCredential, without gas field:
The previous code does not work.
Create a Web3SigningSchema of type GethKeychainPassword with a genesis account:
Call apiV1QuorumRunTransaction function with gethCredential, without gas field:
The previous code does work
Context (Environment)
This issue has appeared when trying different ways to authenticate against Quorum.
Is located at package cactus-plugin-ledger-quorum
Detailed Description
Now, apiV1QuorumRunTransaction can run without gas argument of QuorumTransactionConfig schema only using authentication of type GethKeychainPassword. With CactusKeychainRef and PrivateKeyHex authentication types does not work.
We might require all parameters that are mandatory for Quorum.
The text was updated successfully, but these errors were encountered: