10
votes
Accepted
How Does NET/CPU Recharge Over Time?
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 ...
6
votes
I'm still wrapping my head around EOS RAM and CPU resources. How do they work exactly?
EOS account can choose to buy ram or cpu? Can they not buy any at all?
You need RAM for the nodes to store data about your account,--including account name, public keys, and other meta-data--in the ...
5
votes
How long is the reset period of the cpu bandwith?
libraries/chain/include/eosio/chain/config.hpp#L48-L49
static const uint32_t account_cpu_usage_average_window_ms = 24*60*60*1000l;
static const uint32_t account_net_usage_average_window_ms = ...
3
votes
Restricting runtime of a loop (Transaction took too long)
By default, Nodes have a config for max-transaction-time = 30 but it
doesn't necessary for all Bp to have exact same config for max
transaction time so they can change at any time.
::...
3
votes
Why do failed transactions not consume CPU?
If transaction fails - it will fail on first validating node. It will not reach block producing node at all. Which mean there is no way this account can be charged for broadcasting bad transaction.
...
2
votes
What EOS Chain Information/Interaction do you wish was more publicly available?
Just a quick shot:
Search for blocked/still available names and namespaces like it's done when buying an domain online
Cost calculator for creating an account
2
votes
Accepted
What EOS Chain Information/Interaction do you wish was more publicly available?
Great idea, I would love to use that.
If you need any help, I may use some spare time to participate.
in addition to 5. voting:
stats for BPs (e.g. how long have they have been active as BP, missed ...

tmm♦
- 2,114
2
votes
How to increase billable CPU time?
wait a few hours and send transaction again (it will work if you used CPU before in 24 hour window)
stake more EOS for CPU and you can send again immediately.
push to faster node where you transaction ...
2
votes
How should developers make money to cover cost of EOS CPU, bandwidth, and RAM?
Several things:
You can setup your contract such that users pay for the RAM they use;
You can require an on-chain fee in EOS from users or off-chain fees when people sign up to your service;
You only ...
2
votes
How to stake EOS to increase the amount of CPU time from a separate account?
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 ...
2
votes
Accepted
When someone sells his RAM to another account, how it would clear from previous contracts?
confused00 should have made this response as he/she is correct.
RAM must be freed before you can sell it.
For a dev this means you have to release your claim on the RAM to sell it
For an end user ...
2
votes
Accepted
Ethereum event logs equivalent for EOS
If you want to log events on chain, you can use the demux-js library on the eosio repo to listen to chain events. From here, you can store that data as it updates in your database of choice.
2
votes
Accepted
Does print() cost CPU cycles?
print() appears to cost CPU cycles and expensiveFunction() is evaluated.
I tried with the following. As there is no sleep I just looped (the expensive function takes about 50 ms > 30 ms allowed on the ...
2
votes
Accepted
How much does it cost to add a new permission to an account?
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:
...
2
votes
Accepted
How much does it cost to create a new account, which only needs to hold token balances?
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 ...
2
votes
Accepted
How to avoid cpu usage limits
Your idea is along the right lines. Either do batch updates, where you keep track using a seperate table to indicate current progress. Or right an action which takes the primary key as an argument, ...
2
votes
How to avoid cpu usage limits
I ran into this issue as well. The batch updating and is a good solution, but maybe slow if you only perform one batch per transaction. If your records are independent you can use a Flooding/Recursive ...

tmm♦
- 2,114
2
votes
Code examples for ONLY_BILL_FIRST_AUTHORIZER
The ONLYBILL1ST proposal has now been approved by 15 Block producers. I have tested and OnlyBillFirstAuthorizer is working now.
I'm using eos-sharp. But it's very similar to eos-js. It's very simple. ...
2
votes
Accepted
How do I send transactions from account, differing from actor account?
If the trx allows, you could sign the trx with B's key, thus B would be charged for something that benefits A.
Alternatively you can stake to B from A the EOS in CPU/NET. More on staking here https://...
1
vote
Restricting runtime of a loop (Transaction took too long)
There is no way to calculate this from within the action. The available CPU time is too complicated and depends on too many external variables. The actions are suposed to be determinsitic and ...
1
vote
Different of configuration on computer's BPs?
It is not the case. In EOS which has a DPoS consensus model, BPs work together to produce blocks and forks are not very often. The 21 active BPs will take turns to produce blocks one by one. As long ...
1
vote
Accepted
Are table lookups, like get_table_rows, included in CPU/NET resource calculation?
You are not charged for any RPC getter API calls. If you're not forced to sign the transaction, then there's no way to know which account to charge.
You're charged if you're changing state or ...
1
vote
Accepted
Performance: Would it be a problem to store 100,000 or 1,000,000 rows in a multi_index table?
Find by primary key is an efficient operation and will scale with your table size.
Looping over every row is not something you want to do in the smart contract in a direct way. The risk is you will ...
1
vote
How to buy more RAM without CPU?
I think it makes sense to have more than one EOS account, exactly to deal with this case. In your "emergency" account, you have EOS that you are to use only for staking as needed. Either you can stake ...
1
vote
resource consumption estimation of EOS transaction
You can now estimate your costs for a transaction by using EOS New York's EOS Charge.
Methodology:
We use a a MongoDB query that runs hourly and averages the CPU and NET resource costs ...
1
vote
resource consumption estimation of EOS transaction
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 ...
1
vote
Any methods for calculation and forecasting cpu usage for contract on some period
You can now estimate your costs for a transaction by using EOS New York's EOS Charge.
Methodology:
There is a MongoDB query that runs hourly. This query averages the CPU and NET resource costs ...
1
vote
Does Non fungible Tokens need more RAM?
In fungible tokens you track number of tokens per an account.
In non-fungible tokens you track individual token per account.
The latter is the only way to do non-fungible tokens - you need to track ...
1
vote
Getting account CPU usage in smart contract
In order to access this information, you must create a struct as follows:
struct [[eosio::table, eosio::contract("eosio.system")]] user_resources {
name owner;
asset ...
1
vote
What would happen when a transaction fails because "took too long"?
The failed transaction will not be attempted again automatically. If you're the dApp owner, you should increase the CPU resources or wait for them to replete and try again.
Or better yet, redesign ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cpu × 60smart-contract × 13
ram × 12
net × 12
resources × 9
transactions × 6
bandwidth × 5
nodeos × 2
eosjs × 2
eosio-code × 2
accounts × 2
tokens × 2
table × 2
permissions × 2
development × 2
staking × 2
wasm × 2
ram-allocation × 2
contract-development × 2
signing × 2
stake × 2
network × 2
execution-time × 2
eosio.token × 1
block-producer × 1