How to specify geth --keystore --password -- unlock

Hi @patrick.ogrady,
I’m implementing rosetta for TomoChain, a Ethereum similar one
I wonder how to specify values for the following params ?
geth --keystore --password --unlock

I assume we can’t put them in ethereum/geth.toml
Thank you

Hi @nguyennguyen!

Rosetta implementations should never have access to private key data. So, you would never pass the --keystore, --password and --unlock args to the geth client in your implementation.

Rosetta uses a detached key generation and transaction signing model, so key management and transaction signing are out of Rosetta’s scope:

The Construction API exclusively supports detached key management (i.e. key generation and signing). At a high level, this means that Construction API implementations provide a series of payloads to sign during construction instead of signing transactions directly with some provided key. It is up to the the user of the Construction API implementation to return a correctly formatted signature to the implementation (the format of each signature type is explicitly specified).

Please refer to this overview of construction API which describes in detail the interaction between a Rosetta implementation and its caller during the transaction construction phase. It should help clarify how Rosetta leaves it to the caller to handle key generation and transaction signing.

As of now, there is no open source or off the shelf solution for a Rosetta compatible key management and signing service. But, if you are interested in building one, we have have some example code to help you get started :slightly_smiling_face: :

Hope this helps!

Hi @swapna ,
I understand that key management is out of scope of Rosetta implementation.
In this case, I just finished Rosetta implementation and pack the geth node and Rosetta to docker. When I start geth node and Rosetta API to validate my implementation using rosetta-cli . The geth node stopped due to missing key. So I don’t know how to pass a key to run geth node for testing purpose.
Can you help to advise ?