Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Why is my local blockchain not requiring eosio.code permission when an inline action is executed? #11088

@oliviera9

Description

@oliviera9

I am running a local blockchain with the following command:

nodeos -e -p "eosio" --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --delete-all-blocks > /dev/null 2>&1 &

(nodeos v2.0.6)

I have a contract exposing this action and deployed to 'contract' account:

void token::action1(const name &sender, const asset &quantity, const string &memo)
   {
      action(
        permission_level{sender, "active"_n},
        get_self(),
        "action2"_n,
        std::make_tuple(sender, quantity, memo, std::vector<uint8_t>(), std::vector<uint8_t>())
      ).send();
   }

Calling the action with

cleos push action contract action1 '["account1", "1 TTT", ""]' -p account1@active

Pushing the same action to mainnet returns

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.
Error Details:
transaction declares authority '{"actor":"account1","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor":"contract","permission":"eosio.code"}], provided keys [], and a delay max limit of 3888000000 ms
pending console output: 

and I need to add contract eosio.code permission (under accounts) to account1@active to let it run correctly.

Why is my local blockchain accepting the transaction without setting the eosio.code permission? Is it because of some parameters missing when starting the local blockchain?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions