Open 6r1d opened 1 year ago
Is Alice an already existing account?
Yes. And in client config, the ACCOUNT_ID
should be an account that already exists (was previously registered).
We have a pre-defined public key in "Registering an account" section, possibly with a lost private one.
Since this is an example, should we just generate a new key pair for mad_hatter and include it in the tutorial?
@6r1d can you move this to the iroha2-docs repo?
Documentation URL(s)
Bash guide: transferring assets
Description
Sungod reported an issue with our current documentation: the Bash guide can't be finished, and step 6, "transferring assets", is the reason.
./iroha_client_cli account grant --id "mad_hatter@looking_glass" --permission permission_token.json
The error he sees in the logs is:
The signer does not own the asset specified in the permission token
. Repeating the attempt causes the same error no matter how often he tries it.Log contents
``` User: alice@wonderland {"PUBLIC_KEY":"ed01207233bfc89dcbd68c19fde6ce6158225298ec1131b6a130d1aeb454c1ab5183c0","PRIVATE_KEY":{"digest_function":"ed25519","payload":"9ac47abf59b356e0bd7dcbbbb4dec080e302156a48ca907e47cb6aea1d32719e7233bfc89dcbd68c19fde6ce6158225298ec1131b6a130d1aeb454c1ab5183c0"},"ACCOUNT_ID":"alice@wonderland","BASIC_AUTH":{"web_login":"mad_hatter","password":"ilovetea"},"TORII_API_URL":"http:\/\/127.0.0.1:8080","TORII_TELEMETRY_URL":"http:\/\/127.0.0.1:8180","TRANSACTION_TIME_TO_LIVE_MS":100000,"TRANSACTION_STATUS_TIMEOUT_MS":15000,"TRANSACTION_LIMITS":{"max_instruction_number":4096,"max_wasm_size_bytes":4194304},"ADD_TRANSACTION_NONCE":false} Error: 0: Failed to grant permission to the account 1: Failed to submit transaction SignedTransaction { payload: Payload { account_id: Id { name: "alice", domain_id: Id { name: "wonderland" } }, instructions: Instructions([Grant(GrantBox { object: EvaluatesTo { expression: Raw(PermissionToken(Token { definition_id: Id { name: "can_transfer_user_assets" }, params: {"asset_id": Id(AssetId(Id { definition_id: DefinitionId { name: "tea", domain_id: Id { name: "looking_glass" } }, account_id: Id { name: "mad_hatter", domain_id: Id { name: "looking_glass" } } }))} })), _value_type: PhantomDataThe configuration file is not outdated and was previously copied from
configs/client_cli/config.json
.Sungod noted that even if steps are completed successfully, some errors appear in Compose logs:
I was told that such errors sometimes happen in the Sumeragi consensus algorithm by @mversic. The most probable cause is the delayed packet from the previous round that reaches the node after a change. However, it does not affect the function of the Sumeragi consensus algorithm.
As @mversic suggested, the account id in the config file should apply to the
mad_hatter@looking_glass
instead ofalice@wonderland
, so I've altered the config by replacing theACCOUNT_ID
:There lies a problem: we have a public and private key assigned to the
mad_hatter@looking_glass
account, and I don't know where those are located. Usingcargo run --bin kagami -- crypto
did not help because some keys are generated beforehand.I also need clarification about the whole situation with the accounts here.
Registering an account
" section, possibly with a lost private one.Your suggestions
We'll have to alter the tutorial right after this is fixed.
Who can help?
@mversic @appetrosyan @outoftardis