This is what I understand after a quick walk, through the code.
Your usage status is checked and updated on the chain only when an action is done with your account.( This is intuitive, when I look back, because updating all the account usage statuses periodically will be a huge load on the blockchain)
So what you see when you check your usage is the ...
For v1.5.1 an account that won't perform any action (including transfer) you don't need to delegate CPU/NET. Bare minimum amount for new account is 3 kbytes with the current reward for newaccount which is 1.5 kb (article from Dan). Which require the creator to buy 1608 bytes.
--stake-net="0.0000 EOS" --stake-cpu="0.0000 EOS" --buy-ram-bytes=1608
Testing with v1.5.1, adding a new permission to an account (set account):
Corresponding contract action: updateauth
RAM: 32 bytes
NET: 185 bytes
CPU: 320 time
for set action permission:
Corresponding contract action: linkauth
RAM: 144 bytes
NET: 127 bytes
CPU: 664 time
Important to know:
Ram usage is about using the storage, that means if update a ...
your cleos command looks absolutely right.
if your transaction did not appear on the blockchain - may be it's because it was accepted by your node (the one that gave you transaction hash), but was not accepted by any of block producers. why? may be you was on the edge of your CPU time and it was enough to run your transaction on your node, but not enough to ...
In the EOSIO ecosystem, the CPU, RAM, and NET are all provided to the chain by the block producers.
The EOS tokens gives you access to the staking resources (CPU & NET = Bandwidth) which are replenished after an amount of time and then there is RAM (on-chain storage). Keep in mind that developers have to purchase enough RAM to run a smart contract.
The values you are using should be correct for CPU and NET. max for the max the user has and used for what they currently have consumed. There should also be available which is how much they have remaining. used + available = max.
For RAM however it would be ram_quota and ram_usage.
So I would use something like this, changing the variable names to whatever ...
Staking EOS doesn't give you any interest. It provides resources (CPU/NET) for sending transaction and the power to vote producer.
If you delegate your voting power to proxy like this, they will give you reward. There are many proxies, so you need to compare them by yourself.
This means you don't have any EOS staked to NET bandwidth.
You can stake EOS using the eosio::delegatebw action, but it is a chicken and egg situation, because you need some NET bandwidth in order to stake some NET bandwidth.
Therefore I recommend you do it through a service like bloks.io, which offers 5 free transactions per day. You can use one of these ...
userres table does nothing about resource (CPU/NET) allocation and consumption. It depends on set_resource_limits only, and userres or delband manage staked or delegated amount of EOS and make it available to utilize this information from eosio and other accounts' contract.
BPs have hardware limit RAM (random access memory) and hardware limit receive packages from network.
RAM is about how many data need to save each BPs about your account.
NET is about how many people send transactions now.
What you have written looks right to me.
The reference for this is:
Something I noticed is that transferring EOS doesn't always work if you don't specify the correct precision. So you could also try delegating at the precision that the EOS supply was created with.
You can now estimate your costs for a transaction by using EOS New York's EOS Charge.
We use a a MongoDB query that runs hourly and averages the CPU and NET resource costs experienced for every action performed on the EOS Mainnet within the previous 100,000 blocks (13.8 hours) across all Block Producers.
There is no tool as such but you can estimate the cost by looking at how are you storing the data (this will tell the estimation about RAM) and how much time does your action take (this will give you the idea about CPU).
BTW, This video explains a lot about how to decide the cost estimation. If you get the time, go through the full video.