Jerome | Flow (2024-09-09)
Hi. Trying to figure out why I can't run any transactions for an account using CLI and why they all fail with the following message:
This transaction was not submitted because it was sent to the blockchain with a key that already has a pending transaction.
[Error Code: 1009] error caused by: 1 error occurred:
* transaction verification failed: [Error Code: 1006] invalid proposal key: public key 0 on account 1844efeb3fef2542 does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 0 on account 1844efeb3fef2542 does not have a valid signature: signature is not valid
https://testnet.flowdiver.io/tx/14be665b4a91fb4ad58ab9e89abaf3eb83dbec39dac8d4d04f9e11c7a969ade3
In this transaction I am using a basic Hello World logging transaction, which means it can't be what is in the Cadence code (as hinted by Bastian https://discord.com/channels/613813861610684416/1108479699732152503/1282797682301206563)20 Replies
I've created a thread for your message. Please continue any relevant discussion in this thread.
You can rename this thread using
/title <new title>
If this is a technical question that others may benefit from, considering also asking it on Stackoverflow: https://stackoverflow.com/questions/ask?tags=onflow-cadenceUnknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
I get the same error in CLI when it's run there
jerome@jeromes-MacBook-Pro-2 cadence % flow-c1 transactions send ./transactions/helloworld.cdc -f flow.json -n testnet --signer 'testnet-jp'
β Version warning: a new version of Flow CLI is available (v1.21.0-cadence-v1.0.0-preview.38).
Read the installation guide for upgrade instructions: https://cadence-lang.org/docs/cadence-migration-guide#install-cadence-10-cli
Transaction ID: 14be665b4a91fb4ad58ab9e89abaf3eb83dbec39dac8d4d04f9e11c7a969ade3
Block ID d837557837844368b90750e638969c22a1fcf896a5f001e5097d504d25bc9e8f
Block Height 215669960
β Transaction Error
[Error Code: 1009] error caused by: 1 error occurred:
* transaction verification failed: [Error Code: 1006] invalid proposal key: public key 0 on account 1844efeb3fef2542 does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 0 on account 1844efeb3fef2542 does not have a valid signature: signature is not valid
Status β
SEALED
ID 14be665b4a91fb4ad58ab9e89abaf3eb83dbec39dac8d4d04f9e11c7a969ade3
Payer 1844efeb3fef2542
Authorizers [1844efeb3fef2542]
Proposal Key:
Address 1844efeb3fef2542
Index 0
Sequence 4
No Payload Signatures
Envelope Signature 0: 1844efeb3fef2542
Signatures (minimized, use --include signatures)
Events: None
Code (hidden, use --include code)
Payload (hidden, use --include payload)
Fee Events (hidden, use --include fee-events)
It's weird because in the flow.json, that account is linked to the PK for the key at index 1, so how/why it keeps referring to the key at index 0 is confusingUnknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
{
"contracts": {
"EVM": {
"aliases": {
"emulator": "f8d6e0586b0a20c7",
"mainnet": "e467b9dd11fa00df",
"testnet": "8c5303eaa26202d6"
}
}
},
"networks": {
"emulator": "127.0.0.1:3569",
"mainnet": "access.mainnet.nodes.onflow.org:9000",
"testnet": "access.devnet.nodes.onflow.org:9000"
},
"accounts": {
"emulator-account": {
"address": "f8d6e0586b0a20c7",
"key": "fe809cc837ddcd7e761a482721c050aae43657448db859f4eb8fc421e9609938"
},
"testnet-jp": {
"address": "1844efeb3fef2542",
"key": "f3394ea869680b9dafdbb14663281659a36425e55aa7beab4e7b2785cc3f1caa"
}
}
}
Here's my generation:
jerome@jeromes-MacBook-Pro-2 cadence % flow-c1 keys generate
β Version warning: a new version of Flow CLI is available (v1.21.0-cadence-v1.0.0-preview.38).
Read the installation guide for upgrade instructions: https://cadence-lang.org/docs/cadence-migration-guide#install-cadence-10-cli
π΄οΈ Store private key safely and don't share with anyone!
Private Key f3394ea869680b9dafdbb14663281659a36425e55aa7beab4e7b2785cc3f1caa
Public Key c7528573e40eb9daffa88ac29d4becdb1f1859fbbc8bc0ec38e0862e8814a97dbe5ecfc9f11ec41cc6028f173486aebb9fe631ecc0a9ffdae5d01afba3c4b320
Mnemonic dizzy cry volume flag confirm huge indicate hood summer motor glove tilt
Derivation Path m/44'/539'/0'/0/0
Signature Algorithm ECDSA_P256
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
ahh . thanks!
The docs for flow.json are. not very much at all
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
thanks!
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
I will
Still the same problem - this is new flow.json
"testnet-jp": {
"address": "1844efeb3fef2542",
"key": {
"type": "hex",
"index": 1,
"signatureAlgorithm": "ECDSA_P256",
"hashAlgorithm": "SHA3_256",
"privateKey": "f3394ea869680b9dafdbb14663281659a36425e55aa7beab4e7b2785cc3f1caa"
}
}
jerome@jeromes-MacBook-Pro-2 cadence % flow-c1 transactions send ./transactions/helloworld.cdc -f flow.json -n testnet --signer 'testnet-jp'
β Version warning: a new version of Flow CLI is available (v1.21.0-cadence-v1.0.0-preview.38).
Read the installation guide for upgrade instructions: https://cadence-lang.org/docs/cadence-migration-guide#install-cadence-10-cli
Transaction ID: 9a174b0d7ad225aed77b96535a9bdb00adcaa139ce31781949e8cea9a14717bf
Block ID 1d1f6a4726b346e31a0033ae20e2d1d5c1bc33d5a0cb032e90e62a0027f17541
Block Height 215672117
β Transaction Error
[Error Code: 1009] error caused by: 1 error occurred:
* transaction verification failed: [Error Code: 1006] invalid proposal key: public key 1 on account 1844efeb3fef2542 does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 1 on account 1844efeb3fef2542 does not have a valid signature: signature is not valid
Status β
SEALED
ID 9a174b0d7ad225aed77b96535a9bdb00adcaa139ce31781949e8cea9a14717bf
Payer 1844efeb3fef2542
Authorizers [1844efeb3fef2542]
Proposal Key:
Address 1844efeb3fef2542
Index 1
Sequence 0
No Payload Signatures
Envelope Signature 0: 1844efeb3fef2542
Signatures (minimized, use --include signatures)
Events: None
Code (hidden, use --include code)
Payload (hidden, use --include payload)
Fee Events (hidden, use --include fee-events)
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
yeah π
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
Yeah it worked now. Thanks!
Grr sneaky
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
Yeah that would be cool
a flow.json linter
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View