Currently, many accounts created by 3rd party have no ram and cpu resource. So "buy ram" action will fail due to lack cpu bandwidth, also "delegatebw cpu" action will fail due to lack ram resource even though the account has sufficient balance. Then, these accounts can't do anything due to lack ram or cpu resource.
So, I propose to add a subcommand for cleos to pack "buy ram" action and "delegatebw cpu" action in one transaction to fix above issue. However, in this case, system only allows 3000us cpu bandwidth(leeway) to execute one transaction , while the two actions usually cost 4000+ us. So system will throw below exception .
"Error 3081001: transaction reached the deadline set due to leeway on account CPU limits"
Therefore, EOS should make default leeway value large enough(may 6000us) to execute "buy ram" action and "delegatebw cpu" action in one transaction.




Hi @itleaks , try to let another account buyram for testtest1233.
@noprom Thanks, your suggestion is one solution to solve this problem. But it's not easy to find another account currently. And I think eos should provide this basic ability.
Yeah this is a big issue. These accounts are effectively stuck and can't do anything. Really poor design choice to not let accounts delegate bandwidth to themselves, because there is not enough bandwidth available to perform the actions.
I think it's better to enhance cleos to support "delegatebw" with "buyram" in one transaction.
Please follow the pull request https://github.com/EOSIO/eos/pull/4635
What if the account doesn't have enough cpu and net for now? how to save itself?
The workable solution is to execute "delegatebw" and "buyram" inside a single transaction, this is implemented in #4635 as enhancement. For now you need to ask somebody to stake net/cpu for you.
Yes, i mean what if my account deosn't have available resource to do delegatebw action.
This should be fine even if you don't have stakes for cpu/net, as final validation will use the new cpu/net stake values.
Got it, thanks for reply.
This is fixed. If you still have the problem and wish to discuss further, please post it in https://eosio.stackexchange.com.
Most helpful comment
Yeah this is a big issue. These accounts are effectively stuck and can't do anything. Really poor design choice to not let accounts delegate bandwidth to themselves, because there is not enough bandwidth available to perform the actions.