clockworklabs / clockworklabs/SpacetimeDB

Record energy cost of module updates

Open
#4,847 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

fn update_database, in crates/core/src/host/wasm_common/module_host_actor.rs , does not record the energy cost of the transaction which updates the database to a new module blob. It does record the cost of re-evaluating subscriptions if that's necessary, but not to write the system tables, which includes storing the new code blob.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in crates/core/src/host/wasm_common/module_host_actor.rs at fn update_database. Read how subscription re-evaluation energy is recorded and trace the transaction that writes the system tables and new module blob. Done means the database update's energy cost is recorded consistently with the other transaction work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.