Skip to content
This repository was archived by the owner on Jun 3, 2022. It is now read-only.
This repository was archived by the owner on Jun 3, 2022. It is now read-only.

eth_defaultAccount #12

@gavofyork

Description

@gavofyork

Summary

At present two RPCs allow dapps clients to ascertain a default account from which to send transactions: eth_coinbase and eth_accounts. Neither are well-suited. eth_coinbase is the already defined as the preferred block author for mining/sealing and in certain setups this may collide with the account from which transactions should be signed by default.
eth_accounts returns a list of available accounts with not a single one being necessarily favourite.

This proposal is to create a new RPC for the sole duty of determining a default transaction signing account.

Spec

  • defaultAccount() -> address: Returns the account that the node owner would prefer to see used. This can be contextual if the node supports multiple calling contexts. Should generally be a member of the set of accounts returned by eth_accounts().

Notes

To be as backwards compatible as possible, client authors should consider:

  • implementing eth_coinbase to return the same value as defaultAccount while not mining/sealing;
  • implementing eth_accounts to always have the first value of the list returned equivalent to eth_defaultAccount.

Incubation

We propose the final RPC endpoint for this be eth_defaultAccount; if an incubation period is required, we suggest arb_defaultAccount be adopted initially.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions