regolith-labs / ore-cli

Command line interface for ORE cryptocurrency mining.
919 stars 443 forks source link

Computational budget exceeded #33

Closed nicholasoxford closed 3 months ago

nicholasoxford commented 3 months ago

https://solana.fm/tx/H4RDE5jojaDKguZz4J1Q3NNdMQhr8WyejkDNSUmZGGYnMWyo95S4nZD3wPJm8YvABHq1AUsDTLSBgQF1dppwHEH

Using CLI =0.4.8

nicholasoxford commented 3 months ago

This is strange because in the code I see the 3200 limit, but I only see 1000 limits for mine

ether-Drifter commented 3 months ago

Any FIX to change the compute units.?

nicholasoxford commented 3 months ago

So I actually did some more digging on this, its when you initialize the account before you start mining

Its because dynamic_cus is set to true, so it simulates the transaction (line 65 in send_and_confirm.rs) and returns zero compute units from the simulation. Then line 85 adds +1000

I changed line 85 too

 let cu_budget_ix = ComputeBudgetInstruction::set_compute_unit_limit(
                        units_consumed as u32 + 3201,
                    );

After a bunch of tries I was able to create the account and start mining

nicholasoxford commented 3 months ago

This looks like it was solved with 0.4.9