I have lost admin privileges on the genesis node

+1 vote

chain-browser: getaddresses
{"method":"getaddresses","params":[],"id":1,"chain_name":"chain-browser"}

[
    "1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP"
]

 

From the block explorer

genesis-pubkey-hash8536dc6ae4be6890632c6280acf32d7fe28a3e17

 

I no longer have admin privileges on the genesis mode
How do I reset my address to the genesis-pubkey-hash and how could it have changed?
 
I purged my browser database and restarted so that appears to be the correct genesis-pubkey-hash
 
The params.dat and the web explorer agree on the genesis-pubkey-hash 
 
I don't know how my address is different
 
 
asked Feb 5, 2017 by Jim Schmidt

1 Answer

0 votes

The genesis-pubkey-hash is not the address which had administrator privileges. Instead run:

listpermissions admin

And then compare it to the output of this on each node:

getaddresses

That will tell you which node still has an address with administrator permissions.

answered Feb 5, 2017 by MultiChain
That doesn't work

MultiChain Core RPC client build 1.0 alpha 27 protocol 10007


Interactive mode

chain-browser: listpermissions admin
{"method":"listpermissions","params":["admin"],"id":1,"chain_name":"chain-browser"}

[
    {
        "address" : "1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP",
        "for" : null,
        "type" : "admin",
        "startblock" : 0,
        "endblock" : 4294967295
    }
]
chain-browser: getaddresses
{"method":"getaddresses","params":[],"id":1,"chain_name":"chain-browser"}

[
    "1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP"
]
chain-browser: 127.0.0.1 - - [06/Feb/2017 03:13:24] "GET / HTTP/1.1" 200 6171

chain-browser: grajtm127.0.0.1 - - [06/Feb/2017 03:14:24] "GET / HTTP/1.1" 200 6171

{"method":"grajtm","params":[],"id":1,"chain_name":"chain-browser"}

error code: -32601
error message:
Method not found
chain-browser: grant 17nVRBZzLrESNctf5U5F7cFf52RvnV5ezdiR96 create
{"method":"grant","params":["17nVRBZzLrESNctf5U5F7cFf52RvnV5ezdiR96","create"],"id":1,"chain_name":"chain-browser"}

error code: -4
error message:
No unspent output with admin permission
Well it seems like there are no unspent outputs remaining for this address. This should not happen in normal usage of the high level APIs, which take care to prevent this. So have you been using raw transactions by any chance?

In any event, the solution is just to send a nil transaction to this admin address from any other address. Try this from any other node:

send 1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP 0

After that you should be able to use the admin address again.
I just tried that

chain-browser: send 1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP 0
{"method":"send","params":["1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP",0],"id":1,"chain_name":"chain-browser"}

784116d6a1244bbccdc71a08b7816abe8575d1d8c40b23f1482213443fde46b4


chain-browser: grant 17nVRBZzLrESNctf5U5F7cFf52RvnV5ezdiR96 connect
{"method":"grant","params":["17nVRBZzLrESNctf5U5F7cFf52RvnV5ezdiR96","connect"],"id":1,"chain_name":"chain-browser"}

error code: -4
error message:
No unspent output with activate or admin permission


It didn't help
You need to call the grant API from the node which has the private key for the admin address in its wallet.
This is the genesis node:

chain-browser: listaddresses
{"method":"listaddresses","params":[],"id":1,"chain_name":"chain-browser"}

[
    {
        "address" : "1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP",
        "ismine" : true
    }
]
chain-browser: quit
Bye
[dc@genesis chain-browser]$ strings wallet.dat
main
pool
QvEi
key!
keymeta!
&g)f
2w.y
4^{Rw
CG=6
4D6IaaW$
aT=1
A?al
`9a3X
    bestblock
name&1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfP
receive
purpose&1K1GJ22aUbUPzJ18YQo2ZBcR4tugx9VXrLtAfPX
defaultkey
pool
EkQw
key!
keymeta!
*:LYx
key!
keymeta!
minversion
version
[dc@genesis chain-browser]$

the key is in the wallet.
On the node which you are trying to grant permissions from, please post the output of:

listunspent 0 999999
listpermissions admin
...