You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Despite trying to disable printing using feature flags in #8795, it came
back because of the additive nature of `feature`s. This time, disable
debug printing on validators and full nodes for good, by controlling
their inclusion using a flag passed in during native function creation,
that controls whether to link against a silent version of the debug
print functions or not.
Unit tests, and other CLI usages of the VM typically link against the
unsilenced native functions, and the version used by validators is
silenced.
## Test Plan
Run all existing tests:
```
$ cargo simtest
$ env SUI_SKIP_SIMTESTS=1 cargo nextest run
```
Create a test move package with the following content:
```
module test::test {
struct ImALittleTeapot has copy, drop, store {}
public entry fun print() {
std::debug::print(&ImALittleTeapot {});
}
#[test]
fun test_printing() {
print();
}
}
```
And confirm that the following does print debug output
```
sui$ cargo build --bin sui --release
sui$ cargo build --bin sui-node --release
sui$ ./target/release/sui move test -p $PKG
```
While publishing to a local network and repeatedly calling `print` does
not pollute the validator or fullnode logs.
0 commit comments