near / stakewars-iii

Stake Wars: Episode 3 challenges and place to report issues
87 stars 177 forks source link

Have a bug Login #78

Open SpiritAnima1 opened 2 years ago

SpiritAnima1 commented 2 years ago

Hi there! I want update staking pool key:

near call pool1.factory.shardnet.near update_staking_key '{"stake_public_key": "ed25519:9cSnQeBpJjnoXSEwxdKqZ9BMb53aKT5mi7VYVY6cFYtD"}' --accountId spirit_animal.shardnet.near

But have an error:

Receipt: CLRQFehae9cEQjoD8jm5kHVmhTQHvf6WxePorvkwPXBm
        Failure [pool1.factory.shardnet.near]: Error: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'assertion failed: `(left == right)`\n  left: `AccountId(\"spirit_animal.shardnet.near\")`,\n right: `AccountId(\"jhnglt.shardnet.near\")`: Can only be called by the owner', staking-farm/src/owner.rs:148:9"}}
ServerTransactionError: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'assertion failed: `(left == right)`\n  left: `AccountId(\"spirit_animal.shardnet.near\")`,\n right: `AccountId(\"jhnglt.shardnet.near\")`: Can only be called by the owner', staking-farm/src/owner.rs:148:9"}}
    at Object.parseResultError (/usr/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:31:29)
    at Account.signAndSendTransactionV2 (/usr/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:160:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async scheduleFunctionCall (/usr/lib/node_modules/near-cli/commands/call.js:57:38)
    at async Object.handler (/usr/lib/node_modules/near-cli/utils/exit-on-error.js:52:9) {
  type: 'FunctionCallError',
  context: undefined,
  index: 0,
  kind: {
    ExecutionError: "Smart contract panicked: panicked at 'assertion failed: `(left == right)`\n" +
      '  left: `AccountId("spirit_animal.shardnet.near")`,\n' +
      ' right: `AccountId("jhnglt.shardnet.near")`: Can only be called by the owner\', staking-farm/src/owner.rs:148:9'
  },
  transaction_outcome: {
    block_hash: '98KvSDUWLv4mTccV1DxdnqujvXu6wAcVaFLv8xU7Zj4H',
    id: '2gpHobQXsXLTFZPfQ6VF127C1wXMeEnRkYWUvxyT92Af',
    outcome: {
      executor_id: 'spirit_animal.shardnet.near',
      gas_burnt: 2428128941862,
      logs: [],
      metadata: [Object],
      receipt_ids: [Array],
      status: [Object],
      tokens_burnt: '2428128941862000000000'
    },
    proof: [ [Object], [Object], [Object], [Object] ]
  }
}

Here is i see another account jhnglt.shardnet.near I dont registred this account My pool is: pool1.factory.shardnet.near My account/wallet is: spirit_animal.shardnet.near

Pleace, look in the history of transactions of this accounts: https://explorer.shardnet.near.org/accounts/jhnglt.shardnet.near https://explorer.shardnet.near.org/accounts/spirit_animal.shardnet.near

My account spirit_animal.shardnet.near has transactions only to pool1.factory.shardnet.near But account jhnglt.shardnet.near has no transaction and has nothing to do with my pool. How is it possible?

DDeAlmeida commented 2 years ago

@mina86 @bowenwang1996

htafolla commented 2 years ago

It's possible you did not setup the staking pool correctly for that public key. Do you have the command you used to create the staking pool?

On Wed, Aug 3, 2022 at 8:08 AM David @.***> wrote:

@mina86 https://github.com/mina86 @bowenwang1996 https://github.com/bowenwang1996

— Reply to this email directly, view it on GitHub https://github.com/near/stakewars-iii/issues/78#issuecomment-1203927680, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHO5VLU5BQGGLTQBZZBTBLVXJVLPANCNFSM55OJIK6Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Thanks, Henry Tafolla Office: 316-202-0755 Cell: 316-841-4238 Email: @.***

SpiritAnima1 commented 2 years ago

It's possible you did not setup the staking pool correctly for that public key. Do you have the command you used to create the staking pool?

No, but i have stake transaction in my pool near call pool1.factory.shardnet.near deposit_and_stake --amount 30 --accountId spirit_animal.shardnet.near --gas=300000000000000 https://explorer.shardnet.near.org/transactions/4kAANw4YURnVkwEVuJMV7ViiKFerBfMthLeMu9zX8733 near call pool1.factory.shardnet.near deposit_and_stake --amount 10 --accountId spirit_animal.shardnet.near --gas=300000000000000 https://explorer.shardnet.near.org/transactions/9jHtkAYjQXEpuPh8EtDQCgHsGA5ZxWWnaHnHwDifWh8d

Is there a way to exclude the unknown user and continue as my user spirit_animal.shardnet.near ?

SpiritAnima1 commented 2 years ago

@mina86 @bowenwang1996

DDeAlmeida commented 2 years ago

Please don't ping team, Thay are working on major issue, and will come back to help you later ;)

SpiritAnima1 commented 2 years ago

I solved the problem @WalquerX helped sort this out.

pool1 is a common name. I tried to create pool1 but it was already created. I connected to someone else's inactive pool and delegated tokens to it, withdrew my tokens from pool. I really thought it was my pool. There is no way to see in the transaction history who delegated the first bet and created it.