Cleos should have help text for invalid authorities (was: cleos set account permission bug!!!! ...)
Repetition steps: create account:
cleos wallet import 5KXdExGfaz7r3kYH8FCL9trtCKDSqaufqCBPXHR5CK5Q99ysFRV cleos create account eosio liontable EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP
cleos create account eosio liontoken EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP
cleos create account eosio eosio1 EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP cleos create account eosio 1 EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP cleos create account eosio 2 EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP cleos create account eosio 3 EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP EOS55UqxQmM1A7Hdfp9kAe9vgHbjJM9iXp7EpCH5sNQier9sAB5gP
➜ eos git:(db570801a) cleos set account permission liontoken active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"2","permission":"active"},"weight":1},{"permission":{"actor":"1","permission":"active"},"weight":1}]}' owner Error 3050000: action exception Error Details: Invalid authority: {"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"2","permission":"active"},"weight":1},{"permission":{"actor":"1","permission":"active"},"weight":1}],"waits":[]} ➜ eos git:(db570801a) cleos set account permission liontoken active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"1","permission":"active"},"weight":1},{"permission":{"actor":"2","permission":"active"},"weight":1}]}' owner executed transaction: 555b7a5d741d18221ce382f2fde41b2c0fe9327a45b16d38d12855ef92005196 160 bytes 378 us
eosio <= eosio::updateauth {"account":"liontoken","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[],"accou...
warning: transaction executed locally, but may not be confirmed by the network yet
where accounts array first actor is 2 and second actor is 1,arrive error Invalid authority, but while first actor is 1 and second actor is 2 is ok; Other users have similar problems, but I haven't found any specific rules
We require a certain form of authorities (like sorting on account names) that we are not currently documenting or explaining through cleos messaging.
For 1.0.4 we will try to get cleos to output useful messaging in this case
@dskvr we should consider documenting the requirements in the RPC too: see https://github.com/EOSIO/eos/blob/789490fdec8442a2b8d7dd14dc66d4bbc0adfe36/libraries/chain/include/eosio/chain/authority.hpp#L142-L187
As of #4086 the error messaging and validation is improved. I will leave this ticked open for documentation.
ok
Playing around with the order of the account names fixes this