1

In the system contract (eosio_system.cpp) there are some functions which require

require_auth( _self );

How is this auth level achieved by the 21 producers?

2 Answers 2

9

The _self auth, shown here

require_auth( _self );

requires the authority of the owner of the contract, in this case eosio. If we inspect that account with get account we see this

 owner     1:    1 eosio.prods@active

Which means eosio has given his authority to eosio.prods. And if we inspect that account we see this.

active    15:    1 argentinaeos@active, 1 bitfinexeos1@active, 1 cypherglasss@active, 1 eos42freedom@active, 1 eosauthority@active, 1 eosbeijingbp@active, 1 eoscafeblock@active, 1 eoscanadacom@active, 1 eoscannonchn@active, 1 eosdacserver@active, 1 eosgenblockp@active, 1 eoshuobipool@active, 1 eosisgravity@active, 1 eosliquideos@active, 1 eosnewyorkio@active, 1 eosriobrazil@active, 1 eosstorebest@active, 1 eosswedenorg@active, 1 jedaaaaaaaaa@active, 1 teamgreymass@active, 1 zbeosbp11111@active,

Which means that the 21 BPs can do a multi-sig to sign for eosio.prods, which has delegated authority for eosio.

1
  • 2
    This is a high level answer.
    – smarteasy
    Commented Jul 3, 2018 at 15:52
4

The require_auth() directive asserts that the transaction has been signed by the specified account. In the case of require_auth(_self), the assertion is that the transaction has been signed by the account that deployed the contract. In other words, if you have deployed the contract to the eosio account, then the transaction has to be signed by the eosio account.

2
  • Thank you. What is the mechanism by which the 21 BPs sign as eosio? Commented Jun 27, 2018 at 19:40
  • Generally, they don't. They operate under their individual BP EOS accounts to sign the blocks. Commented Jun 27, 2018 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.