๊ฐ€์ž… ํ›„ ์ดˆ๋Œ€ ๋งํฌ๋ฅผ ๊ณต์œ ํ•˜๋ฉด ๋™์˜์ƒ ์žฌ์ƒ ๋ฐ ์ดˆ๋Œ€ ๋ณด์ƒ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Pete
@_rustopian
@flint_trade_ on Solana. Proof types maxi. Spare time keys, microtones, scifi, tabletop, human languages
๊ฐ€์ž… October 2018
548 ํŒ”๋กœ์ž‰ ์ค‘    2K ํŒฌ
Most Solana programs are one typo - or one agent mistake - away from disaster. Security pros warned us 5 years ago to not do this, but everybody does it. Examples do it. Agents do it. Auditors clear it. Millions drain. fn withdraw(...) -> Result { if record.owner != *user.key { return Err(IllegalOwner); } if amount > record.quote { return Err(InsufficientFunds); } // more `if`s here - hope we have enough! record.quote -= amount; transfer_out(destination, amount) } For both safety and performance, it's time to learn from decades of critical systems engineering, embrace the strength of Rust, and "Parse, Don't Validate." Runtime checks don't belong in a program's internals. They belong at the boundaries. Read Here ๐Ÿ‘‰ ๐Ÿ‘‰
๋” ๋ณด๊ธฐ