gear icon indicating copy to clipboard operation
gear copied to clipboard

refactor(gtest): improve API and docs

Open techraed opened this issue 4 months ago • 1 comments

  • Rename ActorMailbox to UserMailbox, because there's no mailbox for programs
  • Rework logs concept: Logs (Log and CoreLog, DecodedCoreLog) were introduced in the beginning of the gtest. Being useful, however, the naming was wrong. Also several types and API being 1) dependent on Into<Log>, 2) using Log to compare it to CoreLog, which itself is derived from user stored message, 3) having vague builder impl for Log, 4) having no utility for users of CoreLog made the API ambiguous. Now the concept is straightforward and clean. You have just UserMessageEvent derived from StoredMessages stored as events (not in mailbox) and EventBuilder to build those events and perform ops with them in BlockRunResult or UserMailbox
  • Actualize crate docs, making it deeper, clarifying the concepts and usage

techraed avatar Sep 11 '25 10:09 techraed

Review changes with  SemanticDiff

Changed Files
File Status
  gtest/src/manager/reservations.rs  96% smaller
  gtest/src/state/mod.rs  89% smaller
  gtest/src/manager/journal.rs  83% smaller
  gtest/src/program.rs  61% smaller
  gtest/src/system.rs  18% smaller
  gtest/src/state/programs.rs  17% smaller
  gtest/src/manager/block_exec.rs  17% smaller
  gbuiltins/bls381/src/lib.rs  15% smaller
  gtest/src/state/mailbox.rs  7% smaller
  gtest/src/manager/memory.rs  1% smaller
  Cargo.lock Unsupported file format
  gbuiltins/eth-bridge/src/lib.rs  0% smaller
  gtest/Cargo.toml Unsupported file format
  gtest/src/artifacts.rs  0% smaller
  gtest/src/builtins/bls12_381.rs  0% smaller
  gtest/src/builtins/eth_bridge.rs  0% smaller
  gtest/src/builtins/mod.rs  0% smaller
  gtest/src/lib.rs Unsupported file format
  gtest/src/log.rs  0% smaller
  gtest/src/manager.rs  0% smaller
  gtest/src/manager/send_dispatch.rs  0% smaller
  gtest/src/manager/task.rs  0% smaller
  gtest/src/state/bridge.rs  0% smaller
  gtest/src/state/mailbox/interface.rs Unsupported file format

semanticdiff-com[bot] avatar Sep 11 '25 10:09 semanticdiff-com[bot]