Thanks to awesome work by theoretical and jcalfee we now have two simple command line tools that will remove keys that are not in the Bitshares 2 genesis file from your keys json file generated by the wallet_export_keys command. I've just tested it on a wallet with 95k keys (16MB) and it was reduced to 375 keys (64kB). This might get embedded in the Bitshares 2 wallet and in a future 0.9.4 release of legacy Bitshares, but I wanted to share it with those of you who are struggling with importing your keys.
DISCLAIMER: try at your own risk, I'm not responsible for any loss of keys or balances, etc. Instructions are for *nix/OSX
DISCAIMER 2: Please backup and keep safe your original keys file first
The tools were written using Python and Nodejs so you'll need those installed.
Step 1: Generate a bloom filter file from Bitshares 2 genesis filepython create_bloom_filter.py -i ./genesis.json --o bloom.dat
Step 2: Filter your old wallet.json using the bloom filter- Clone the graphene-ui repo: "git clone https://github.com/cryptonomex/graphene-ui.git"
- In a terminal, go inside the cloned repo: "cd graphene-ui/dl/" and install dependencies "npm install"
- Copy the bloom.dat file you generated as well as your wallet.json file to "graphene-ui/dl/programs"
- From inside the folder "graphene-ui/dl/programs", apply the filter to your wallet.json using:
cat OLD_WALLET_NAME.json | node ./bloom_filter_wallet.js > NEW_WALLET_NAME.json
The script will run, telling you as it goes how many keys it's removed and has processed.
Step 3: ProfitOnce that's done, you should have a MUCH smaller json file containing the keys you need to import in the Bitshares 2.0 wallet of your choice, light wallet, OpenLedger, localhost, etc.