stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
60 stars 40 forks source link

Tracing #1324

Closed graydon closed 7 months ago

graydon commented 8 months ago

This PR splits the existing "observation" machinery out into a separate "tracing" subsystem that uses the shadow budget to reduce DoS risk if it's ever activated in production. It therefore includes a (manual, awful) metered hash implementation of everything that gets hashed in that machinery. It also includes some reorganization of the code and general reduction of unnecessary allocations.

There'll be a corresponding change to core to route this tracing output into the core logging system. There are maybe a couple things left to clean up tomorrow but it's good enough to be reviewed now: