Closed goplaygo closed 6 years ago
I'm guessing you're attempting to follow these instructions. There's a step that needs to be added. After unlocking your wallet, issue the following command:
cleos wallet import 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
This loads the default key used by a private blockchain. The instructions will be updated.
@jgiszczak you always lead to the link for getting the start, but I was wrong with this link, and I forget the default wallet private-key, I just create my own wallet and also import the key, but it did not help.so I was very confused about this command but not giving enough examples.
Hello, I did not solve this problem, after I imported my public keys. Cleos returning - Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked
I get this. Is there a resolution?
@PillarDevelopment Did you get the solution??
Same here, created wallet, created two sets of keys and imported them into the wallet, unlocked the wallet and called create account using:
cleos wallet create -n owner --to-console
cleos wallet unlock -n owner
cleos create key --to-console
Saved for later use: Private key: 5JRcK8gb6DCCiPMDNLdGWtevDGLHnG4qvoEDqduCJD58C5cgoL7 Public key: EOS6DEoLCmQKEfVVAoSUyUrFwvGiPdhuGC92Z43MHyzY4yqpEoSXc
cleos create key --to-console
Saved for later use: Private key: 5J3fFkcwoquaF19pE1R7Zftc2k6Xh1zoPSdyqR5NoBDZz4aq2qk Public key: EOS6BZXzdB7kyqUBUexcp6nNwtnx6eQpQXPfMLtibDwxpqb3dbENC
Imported both keys in wallet:
cleos wallet import -n owner --private-key 5JRcK8gb6DCCiPMDNLdGWtevDGLHnG4qvoEDqduCJD58C5cgoL7
cleos wallet import -n owner --private-key 5J3fFkcwoquaF19pE1R7Zftc2k6Xh1zoPSdyqR5NoBDZz4aq2qk
Ran the create user command:
cleos create account eosio user1 EOS6DEoLCmQKEfVVAoSUyUrFwvGiPdhuGC92Z43MHyzY4yqpEoSXc EOS6BZXzdB7kyqUBUexcp6nNwtnx6eQpQXPfMLtibDwxpqb3dbENC
And the result is the exact same error:
Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
But the keys are related because they are imported into the same wallet. Or what am I missing here?
Same here. Exact steps @marinalexandru has taken and same result.
The documentation has been updated. At the end of "Step 2: Create a Wallet," there's now a section "Load the Tutorial Key".
The missing key is for the eosio
account. It is not required to load the keys for the new account into any wallet to create an account. The tutorial is somewhat misleading in this respect. Only the account which is authorizing the create transaction needs to have a loaded key, in this case the eosio
account, and its associated key. That is the default key in the tutorials.
The missing step is now in the tutorial I linked, with the updated syntax. Note that the command I recommended in July was the syntax at the time. The current syntax requires the --private-key
flag.
@jgiszczak, notice you suggest using http-server-address = 127.0.0.1:8899
and then using --wallet-url=http://localhost:8899
which throws
Error 3200006: invalid http request Error Details: The server has rejected the request as invalid! Please verify this url is valid: http://localhost:8899/v1/wallet/unlock If the condition persists, please contact the RPC server administrator for localhost!
Can you update it to use 127.0.0.1 throughout?
Also, still having an issue. Here is what I've done:
norsegaud@norsegaudnet ~ cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 109 ↵ 2606 22:03:32 imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV norsegaud@norsegaudnet ~ cleos --wallet-url=http://127.0.0.1:8899 create account eosio test EOS6bHhxtKotwybaPwJufXtFiYumL3DGcitv2xvZ5s3Kpyz57qwH7 EOS6tARBHmwLNaep4bhWXnjLWbt9FEKRfAzuAE3KAs7MU1bTeV2YL Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked. norsegaud@norsegaudnet ~ cleos --wallet-url=http://127.0.0.1:8899 create account eosio testuser EOS6bHhxtKotwybaPwJufXtFiYumL3DGcitv2xvZ5s3Kpyz57qwH7 EOS6tARBHmwLNaep4bhWXnjLWbt9FEKRfAzuAE3KAs7MU1bTeV2YL Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked. norsegaud@norsegaudnet ~ cleos wallet import -n default --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 1 ↵ 2609 22:03:54 Error 3120008: Key already exists norsegaud@norsegaudnet ~ cleos wallet list 1 ↵ 2610 22:04:10 Wallets: [ "default *" ]
Got it. It's unclear in the docs that you have to create the eosio wallet and then import the eosio private key into that. I thought I could just import the private key into any wallet I made and use that user when doing create account
. Can you also clarify that in the guide?
@marinalexandru that should solve it for you too:
pkill keosd
cleos wallet create -n eosio -f eos_eosio_password
cat eos_eosio_password
& copy it
cleos wallet open -n eosio
cleos wallet unlock -n eosio
cleos create account eosio testuser EOS6bHhxtKotwybaPwJufXtFiYumL3DGcitv2xvZ5s3Kpyz57qwH7 EOS6tARBHmwLNaep4bhWXnjLWbt9FEKRfAzuAE3KAs7MU1bTeV2YL
# eosio <= eosio::newaccount {"creator":"eosio","name":"testuser","owner":{"threshold":1,"keys":[{"key":"EOS6bHhxtKotwybaPwJufXtF...
warning: transaction executed locally, but may not be confirmed by the network yet ]```
@NorseGaud Which document still says to use http://localhost:8899? I haven't found one that does.
It isn't necessary to create an eosio
wallet. Loading the key for the eosio
account into any wallet works as long as that wallet is open and unlocked at the time you try to use the eosio
key to sign a transaction.
@jgiszczak https://developers.eos.io/eosio-nodeos/v1.2.0/search?q=localhost:8899 - Looks like two
I tried opening and unlocking my test wallet and even with the key it was unable to do anything without the wallet being "eosio". I'll try it again later tonight.
Documentation updates in progress.
Thank you sir :)
Ok, follow up to this. I'm using docker and see the following:
imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV Opened: eosio Unlocked: eosio Reading WAST/WASM from /opt/eosio/bin/data-dir/contracts/eosio.bios/eosio.bios.wast... Assembling WASM... Publishing contract... Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
I've confirmed it's open, so I'm confused why this error is thrown. Could it be the private key I imported being wrong?
You didn't include your command line, so I can't really tell.
If you are using the default genesis file and attempting to set the contract on the eosio account, then you imported the correct key.
Sorry about that, here is the full logs of all steps after building nodeos and keos
2018-08-28T19:50:00.610430900-04:00 container exec_create: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet list 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo, description=This is a base image for building eosio/eos, execID=e67603c84672de0a51675fe5eaeab071b89e9e9ba4d484545177f175a6ab42d5, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:00.614673000-04:00 container exec_start: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet list 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=e67603c84672de0a51675fe5eaeab071b89e9e9ba4d484545177f175a6ab42d5, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:00.782325700-04:00 container exec_die 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=e67603c84672de0a51675fe5eaeab071b89e9e9ba4d484545177f175a6ab42d5, exitCode=0, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:00.903282900-04:00 container exec_create: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet create -n eosio 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=ec553facdfb3b5a42c5c2ca6a582ebb5feac0c5128897040fe3c027d4fe01b53, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:00.908188500-04:00 container exec_start: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet create -n eosio 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=ec553facdfb3b5a42c5c2ca6a582ebb5feac0c5128897040fe3c027d4fe01b53, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.033180400-04:00 container exec_die 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=ec553facdfb3b5a42c5c2ca6a582ebb5feac0c5128897040fe3c027d4fe01b53, exitCode=0, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.131152300-04:00 container exec_create: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet import -n eosio --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=b2e6d612951a1970c0398321ebdcc29d2cf4399410224aaeae02e4f32b8f16ec, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.135640400-04:00 container exec_start: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet import -n eosio --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=b2e6d612951a1970c0398321ebdcc29d2cf4399410224aaeae02e4f32b8f16ec, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV 2018-08-28T19:50:01.287588600-04:00 container exec_die 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=b2e6d612951a1970c0398321ebdcc29d2cf4399410224aaeae02e4f32b8f16ec, exitCode=0, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.404444900-04:00 container exec_create: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet open -n eosio 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=3a0d9cfdf4ecfc97551278eff95ff15899e8b407e55a1aa92798fb931479a9f7, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.408466400-04:00 container exec_start: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet open -n eosio 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=3a0d9cfdf4ecfc97551278eff95ff15899e8b407e55a1aa92798fb931479a9f7, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) Opened: eosio 2018-08-28T19:50:01.585383000-04:00 container exec_die 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=3a0d9cfdf4ecfc97551278eff95ff15899e8b407e55a1aa92798fb931479a9f7, exitCode=0, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.706757000-04:00 container exec_create: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet unlock -n eosio --password PW5HsWoqQdTV6VxLQRGEhzQKEehbs4SbBToutCyKH7o6byuMo51SD 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=aedc3c41b932ddb7da8b63bd1399ed49a4b5333ab2dbb6d233c4f0d649cf4b65, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.710311900-04:00 container exec_start: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 wallet unlock -n eosio --password PW5HsWoqQdTV6VxLQRGEhzQKEehbs4SbBToutCyKH7o6byuMo51SD 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=aedc3c41b932ddb7da8b63bd1399ed49a4b5333ab2dbb6d233c4f0d649cf4b65, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) Unlocked: eosio 2018-08-28T19:50:01.820947200-04:00 container exec_die 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=aedc3c41b932ddb7da8b63bd1399ed49a4b5333ab2dbb6d233c4f0d649cf4b65, exitCode=0, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.928266300-04:00 container exec_create: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 set contract eosio /contracts/eosio.bios /contracts/eosio.bios/eosio.bios.wast /contracts/eosio.bios/eosio.bios.abi 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=91e583b9b39762f185e71d5b110bad2c41895cae0ef6bbececcfba56110ae395, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) 2018-08-28T19:50:01.931152300-04:00 container exec_start: /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900 set contract eosio /contracts/eosio.bios /contracts/eosio.bios/eosio.bios.wast /contracts/eosio.bios/eosio.bios.abi 03f785d73d341f199889bc7dbcdd23543c9aaf45fa72468c46ab00db61418df0 (author=xiaobo , description=This is a base image for building eosio/eos, execID=91e583b9b39762f185e71d5b110bad2c41895cae0ef6bbececcfba56110ae395, image=eosio/eos-dev:v1.1.0, maintainer=Xiaobo Huang-Ming Huang , name=keos_test, version=0.1.1) Reading WAST/WASM from /contracts/eosio.bios/eosio.bios.wast... Assembling WASM... Publishing contract... Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
Here is the script I use:
#!/bin/bash # Allow version input if [ ! -z "$1" ]; then if [[ $1 =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then VERSION="$1"; else echo "Something is wrong with the image version you input. Must follow this pattern: \"v1.1.0\"" exit fi else VERSION="v1.1.4"; fi echo "Image Version: [$VERSION]" DATADIR="/opt/eosio/bin/data-dir" DATAVOLUME="$HOME/nodeosd-test-data-volume" echo "Location of Data: [$DATADIR]" echo "Location of Data Volume: [$DATAVOLUME]" # Setup $CLEOS to use throughout script CLEOS="docker exec -w $DATADIR keos_test /opt/eosio/bin/cleos -u http://nodeos:8888 --wallet-url http://127.0.0.1:8900" # Set Genesis if the blocks directory does not exist yet if [ ! -d $DATAVOLUME/blocks ]; then echo "Genesis Loaded: [true]" GENESIS="--genesis-json $DATADIR/genesis.json" else echo "Genesis Loaded: [false]" fi # BODY ## Setup Docker container printf "\n[Creating EOSIO Container]\n" printf "EOSIO CONTAINER ID: $(docker run --rm --name nodeos_test -d -p 8888:8888 -p 9876:9876 -v ~/nodeosd-test-data-volume:$DATADIR eosio/eos-dev:$VERSION /bin/bash -c "nodeos --http-alias=127.0.0.1:8888 --http-alias=nodeos:8888 -d $DATADIR --config-dir $DATADIR $GENESIS")\n" sleep 1 ## Setup Docker container for keosd printf "\n[Creating KEOSD Container]\n" printf "KEOSD CONTAINER ID: $(docker run --rm --name keos_test -v ~/keosd-test-data-volume:$DATADIR --link nodeos_test:nodeos -p 8900:8900 -d eosio/eos-dev:$VERSION keosd --wallet-dir $DATADIR --http-server-address=127.0.0.1:8900 --http-alias=127.0.0.1:8900)\n" # USER SETUP if [ -z "$($CLEOS wallet list | grep eosio)" ]; then # If eosio user doesn't exist, set it up $CLEOS wallet create > $DATAVOLUME/default.pwd $CLEOS wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 $CLEOS wallet open $CLEOS wallet unlock --password $(cat $DATAVOLUME/default.pwd | tail -1 | cut -d\" -f2) $CLEOS set contract eosio /contracts/eosio.bios function generateUser(){ $CLEOS wallet create -n $1 > $DATAVOLUME/$1.pwd $CLEOS create key > $DATAVOLUME/$1.full cat $DATAVOLUME/$1.full | grep "Public" | cut -d " " -f 3 > $DATAVOLUME/$1.pub cat $DATAVOLUME/$1.full | grep "Private" | cut -d " " -f 3 > $DATAVOLUME/$1.private $CLEOS wallet import -n $1 --private-key $(cat $DATAVOLUME/$1.private) $CLEOS create account eosio $1 $(cat $DATAVOLUME/$1.pub) $(cat $DATAVOLUME/$1.pub) } generateUser eosio.token $CLEOS set contract eosio.token /contracts/eosio.token generateUser user1 generateUser user2 fi
I can run docker exec keos_test curl -s http://nodeos:8888/v1/chain/get_info
and confirm it's showing info.
Genisis.json:
{ "initial_timestamp": "2018-06-09T00:00:00.000", "initial_key": "EOS6CttW6XFfeRXaiqbD1Hoc9xPfVJrJ9RVZqA8tNTDLriNEyamFY", "initial_configuration": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, "max_transaction_net_usage": 524288, "base_per_transaction_net_usage": 12, "net_usage_leeway": 500, "context_free_discount_net_usage_num": 20, "context_free_discount_net_usage_den": 100, "max_block_cpu_usage": 200000, "target_block_cpu_usage_pct": 1000, "max_transaction_cpu_usage": 150000, "min_transaction_cpu_usage": 100, "max_transaction_lifetime": 3600, "deferred_trx_expiration_window": 600, "max_transaction_delay": 3888000, "max_inline_action_size": 4096, "max_inline_action_depth": 4, "max_authority_depth": 6 } }
Ok, I'm told by test net folks that this is due to the node not being synced yet. Looks unrelated to the latest branch and even v1.2.x.
I don't think the test net folks are correct. Your problem is a key mismatch. The script imports 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 but that's the private key for EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV. Your genesis key is EOS6CttW6XFfeRXaiqbD1Hoc9xPfVJrJ9RVZqA8tNTDLriNEyamFY. You need to be importing the matching private key. All of my instructions were assuming you were following the tutorials, which have you use the default key pair. You're using a custom key pair. If you're going to deviate from the instructions, you have to maintain the deviation throughout.
when i use
cleos set contract eosio build/contracts/eosio.bios -p eosio
backwhy?