Skip to content
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

Urgent: "personal unlockAccount" Method Not Available on BSC Node #2920

Open
osizadmin opened this issue Feb 26, 2025 · 7 comments
Open

Urgent: "personal unlockAccount" Method Not Available on BSC Node #2920

osizadmin opened this issue Feb 26, 2025 · 7 comments
Assignees

Comments

@osizadmin
Copy link

osizadmin commented Feb 26, 2025

I am currently running a BSC full node and have encountered an issue where the personal.unlockAccount method is not available. Despite enabling allow-insecure-unlock and including "personal" in the HTTPModules configuration, the method remains undefined in the Geth console.

Node Details:

  • Geth Version: v1.5.6-847cef93-20250214
  • Network: BSC Mainnet (Chain ID: 56)
  • Sync Mode: Full
  • HTTP API Enabled: admin, personal, eth, net, web3, txpool, parlia
  • Configuration:
    • allow-insecure-unlock enabled
    • HTTPModules includes "personal"
    • WSPort and HTTPPort properly configured
    • start command:
      geth_linux --cache=8000 --config /opt/bsc/config.toml --datadir /opt/bsc/node --rpc.allow-unprotected-txs --http --maxpeers=500 --ws --syncmode=full --history.transactions=0 --allow-insecure-unlock --tries-verify-mode=none --db.engine=pebble --http.api "admin,personal,eth,net,web3,txpool,parlia"

log:

INFO [02-26|04:49:31.971] IPC endpoint opened url=/opt/bsc/node/geth.ipc
ERROR[02-26|04:49:31.972] Unavailable modules in HTTP API list unavailable=[personal] available="[admin debug web3 eth txpool mev parlia miner net]"
INFO [02-26|04:49:31.972] HTTP server started endpoint=127.0.0.1:8545 auth=false prefix= cors= vhosts=localhost

Despite restarting the node and updating to the latest version, the issue persists. Could you please advise on resolving this problem? Any guidance or documentation references would be greatly appreciated.

@buddh0
Copy link
Collaborator

buddh0 commented Feb 26, 2025

personal namespace has been removed, refer to ethereum/go-ethereum#30704

for your need, I think you can use the '--unlock'

	UnlockedAccountFlag = &cli.StringFlag{
		Name:     "unlock",
		Usage:    "Comma separated list of accounts to unlock",
		Value:    "",
		Category: flags.AccountCategory,
	}

@osizadmin
Copy link
Author

Hi,

Without personal namespace, how to we are create new address using personal_newAccount & how will unlock our old accounts using personal_unlockAccount & personal.lockAccount.

is, there any alternative method to do this?

@buddh0
Copy link
Collaborator

buddh0 commented Feb 27, 2025

Hi,

Without personal namespace, how to we are create new address using personal_newAccount & how will unlock our old accounts using personal_unlockAccount & personal.lockAccount.

is, there any alternative method to do this?

use clef to create new account?
then pass it to the flag unlock when start

whether to recover personal namespace is not decided in our internal team.

before that, maybe you can try branch in Revert "all: remove personal RPC namespace (#30704)

@osizadmin
Copy link
Author

Geth
Version: 1.5.6
Git Commit: 747cef9378d7759e7eda165e432121f74bt0fbb2
Git Commit Date: 20250214
Architecture: amd64
Go Version: go1.23.6
Operating System: linux
GOPATH=
GOROOT=/opt/hostedtoolcache/go/1.23.6/x64

Geth v1.5.6. I noticed that Clef is not included by default in this version. Since Clef is essential for signing transactions securely, I would like to know the recommended approach to deploy and use Clef with the latest BSC Geth version.

Could you please share official documentation or best practices for setting up an external Clef instance with BSC Geth.

@NathanBSC
Copy link
Contributor

NathanBSC commented Feb 28, 2025

build clef

git clone https://github.com/bnb-chain/bsc.git
cd bsc
make all

once it's done, you can find clef in ./build/bin/

use clef

you can refer https://geth.ethereum.org/docs/tools/clef/introduction
(bsc mainnet chainid56, chaple testnet chainid 97)

@osizadmin
Copy link
Author

HI,

Clef is still prompting for manual approval and password entry, which prevents automation.

curl -X POST --data '{"jsonrpc":"2.0","method":"account_new","params":[],"id":1}'
-H "Content-Type: application/json"
http://ip:port

Clef prompts:

Approve? [y/N]:

y

New account password

Please enter a password for the new account to be created (attempt 0 of 3)

I need a way to fully automate account creation without manual intervention. Ideally, Clef should:

Automatically approve requests using clef-rules.js.
Use a predefined password from a secure file without prompting.
Work seamlessly via Web3 (account_new).
Could you please provide guidance on how to achieve this? Any configuration changes or alternative approaches would be appreciated.

@zlacfzy
Copy link
Contributor

zlacfzy commented Mar 4, 2025

You can refer to the official Clef documentation for more information on how to implement rules: https://geth.ethereum.org/docs/tools/clef/rules#ruleset-examples
Currently, Clef supports rules for ApproveListing , ApproveSignData , and ApproveTx , but it does not support ApproveNewAccount in this manner. For more details, see the Clef rules implementation in the Go-Ethereum repository: :https://github.com/ethereum/go-ethereum/blob/7405dc5c4b51a950abf72cd1c31368891cd5c9b3/signer/rules/rules.go#L202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants