Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
change to 128 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoljub-duric committed Sep 28, 2023
1 parent 7482ab5 commit e43a703
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5689,17 +5689,18 @@ The pseudo-code below does *not* explicitly enforce the restrictions of which im
es.balance := es.balance + amount
copy_cycles_to_canister<es>(dst, amount.to_little_endian_bytes())

ic0.burn_cycles<es>(amount_to_burn : i64) : i64 =
ic0.burn_cycles<es>(amount_high : i64, amount_low : i64, dst : i32) =
if es.context ∉ {U, T, Rt, Ry} then Trap {cycles_used = es.cycles_used;}
let amount = min(amount_to_burn, es.balance - freezing_limit(
let amount = amount_high * 2^64 + amount_low
let burned_amount = min(amount, es.balance - freezing_limit(
es.params.sysenv.compute_allocation,
es.params.sysenv.memory_allocation,
es.params.sysenv.freezing_threshold,
memory_usage_wasm_state(es.wasm_state) + es.params.sysenv.memory_usage_raw_module + es.params.sysenv.memory_usage_canister_history,
es.params.sysenv.subnet_size,
))
es.balance := es.balance - amount
return amount
es.balance := es.balance - burned_amount
copy_cycles_to_canister<es>(dst, burned_amount.to_little_endian_bytes())

ic0.canister_self_size<es>() : i32 =
if es.context = s then Trap {cycles_used = es.cycles_used;}
Expand Down

0 comments on commit e43a703

Please sign in to comment.