ergoplatform / sigma-rust

Rust implementation of ErgoTree interpreter and wallet-related features
Creative Commons Zero v1.0 Universal
69 stars 48 forks source link

Transaction Validation #736

Closed SethDusek closed 6 months ago

SethDusek commented 10 months ago

Initial stateless validation work (things we can validate without needing blockchain context). Also includes a fix where we were allowing as many as u16::MAX inputs/outputs (65535) when ergo only allows i16::MAX (Short.MaxValue in scala) which is (32767). https://github.com/ergoplatform/ergo/blob/48239ef98ced06617dc21a0eee5670235e362933/ergo-core/src/main/scala/org/ergoplatform/modifiers/mempool/ErgoTransaction.scala#L93

coveralls commented 10 months ago

Pull Request Test Coverage Report for Build 8953175335

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
ergo-lib/src/chain/transaction/ergo_transaction.rs 28 29 96.55%
ergotree-interpreter/src/eval/error.rs 0 2 0.0%
ergotree-interpreter/src/eval/scontext.rs 3 5 60.0%
ergotree-interpreter/src/eval/scoll.rs 8 11 72.73%
ergotree-ir/src/mir/value.rs 3 6 50.0%
ergo-lib/src/chain/transaction.rs 7 11 63.64%
ergo-lib/src/chain/transaction/storage_rent.rs 7 21 33.33%
ergo-lib/src/chain/parameters.rs 12 28 42.86%
ergo-lib/src/wallet/tx_context.rs 73 91 80.22%
<!-- Total: 165 228 72.37% -->
Files with Coverage Reduction New Missed Lines %
ergotree-interpreter/src/eval/error.rs 2 21.88%
ergotree-ir/src/serialization/types.rs 6 83.28%
<!-- Total: 8 -->
Totals Coverage Status
Change from base Build 8951357735: 0.1%
Covered Lines: 10723
Relevant Lines: 13325

💛 - Coveralls
SethDusek commented 8 months ago

Should be good to go now! Some notes:

kushti commented 7 months ago

Please fix linter issues