question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Wallet Private Key on Besu Hyperledger Network

See original GitHub issue

I’m working on a project using the besu hyperledger network and I found that creating an instance for the wallet with the private key doesn’t work.

new ethers.Wallet( privateKey [ , provider ] )

The solution we found was to use the wallet’s mnemonic to generate the instance.

ethers.Wallet.fromMnemonic( mnemonic [ , path ] ).connect(provider)

I would like to know if this is normal behavior and if there is any solution for using the wallet private key to sign transactions on the besu network.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ricmoocommented, Jul 23, 2020

The Wallet only uses eth_sendRawTransaction.

Definitely agree with adding more to “doesn’t work”. 😃

1reaction
benjamincburnscommented, Jul 22, 2020

@ricmoo if this is an issue at all, I don’t believe this is a Besu issue (disclosure, I work for the team that maintains Besu). In the case when the ethers.Wallet is given a private key explicitly, I’d expect that it shouldn’t touch any of the account management RPC calls implemented in the client.

If there is a problem, the cause can probably be observed by running Besu with TRACE logging enabled, as that will log all RPC traffic. I’d watch out for calls to eth_accounts on creation of ethers.Wallet, or for usage of eth_sendTransaction when it should be using eth_sendRawTransaction.

That said, @freitasgouvea it’d be a lot easier to understand what’s happening here if “doesn’t work” was defined a bit better, and ideally an error message/stack trace were included.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Wallets for Key Management - Hyperledger Besu
Using wallets for key management ... Hyperledger Besu does not support key management inside the client. Use: ... In Besu, you...
Read more >
From Ethereum Wallet to the Hyperledger BESU private ...
Hyperledger Besu uses the private and public key pair to sign and verify transactions and the node address as an identifier for the...
Read more >
(PDF) Private and Trustworthy Distributed Lending Model ...
Specifically, the privacy of the loan transactions is protected by customizing Hyperledger Besu and Orion transaction manager with the privacy group feature.
Read more >
Hyperledger Besu: An Exhaustive Guide - Blockchain Council
Besu does not support key management owing to security issues. Instead, for managing private keys, you can use any Ethereum-compatible wallet or ...
Read more >
Privacy with Hyperledger Besu - Web3j
The Besu module in Web3j provides support for creating private transactions and privacy groups on Hyperledger Besu. For information as to how privacy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found