How to modify wallet address of filecoin?

I have multiple nodes and need to configure the same wallet address for mining.

And when i reinstall go-filecoin, i need to use the wallet address of before.

I have tried the command in the picture, but it isn’t worked, is anyone can help? thanks.

My go-filecoin was compiled from source of the latest version, the commit is : 7fb1c4ef8cb1eab39644f89f2e723535b9ef9601

The repo is initialized by :
go-filecoin init --repodir=$repodir/repo --devnet-nightly --genesisfile=https://genesis.nightly.kittyhawk.wtf/genesis.car

Hey @zhoushuyue thanks for posting here.

The goto way to share addresses between nodes is to export an address from one node and then import it in the others. To do this run go-filecoin --enc=json export <addr> > walletfile.json on your first node that already has the address. This will output a walletfile to walletfile.json. Then run go-filecoin import walletfile.json on the other nodes that need to have the address.

I haven’t done this in a while so there could be some hiccups. Please post back here with any problems you encounter using this approach.

1 Like

Thank you for your reply.

I have used from 0.4.6 version of go-filecoin and compiled from the latest source code (commit: b9f1a417a6ab50387ff17ceae31da49ff59c805a), but they didn’t have the export or import instruction set.

whoops, the command is called wallet export and wallet import


Yes, i get it, thanks!

After doing ‘go-filecoin wallet import’, i make the address to default by ‘go-filecoin config wallet.defaultAddress $addr’, It works as i want.

By the way, Is that have a way to remove wallet address? or i need to reinstall the repo of filecoin?

Awesome, glad its working.

Right now there is no way to remove a wallet address from the CLI. I can imagine us wanting that, though we’ll need to design it super carefully to be really hard to call by accident. If this is something important to your use case and can advocate for the way to make this happen is to submit a feature request in the github issues.