|
| 1 | +# Evaluation |
| 2 | + |
| 3 | +- **Status:** in progress |
| 4 | +- **Application Document:** [pallet verifier](https://github.com/w3f/Grants-Program/blob/master/applications/pallet-verifier.md) |
| 5 | +- **Milestone:** 1 |
| 6 | +- **Previously successfully merged evaluation:** All by PieWol |
| 7 | + |
| 8 | +| Number | Deliverable | Accepted | Link | Evaluation Notes | |
| 9 | +| ------ | ----------- | :------: | ---- |----------------- | |
| 10 | +| **0a.** | License | <ul><li>[x] </li></ul> | [MIT](https://github.com/davidsemakula/pallet-verifier/blob/master/LICENSE-MIT) or [Apache 2.0](https://github.com/davidsemakula/pallet-verifier/blob/master/LICENSE-APACHE)| Dual-licensed| |
| 11 | +| **0b.** | Documentation | <ul><li>[x] </li></ul> |[README](https://github.com/davidsemakula/pallet-verifier/blob/master/README.md) and [Architecture](https://github.com/davidsemakula/pallet-verifier/blob/master/ARCHITECTURE.md) | very nice | |
| 12 | +| **0c.** | Testing and Testing Guide | <ul><li>[x] </li></ul> |[Testing guide](https://github.com/davidsemakula/pallet-verifier/blob/master/TESTING.md) | good | |
| 13 | +| **0e.** | Article | <ul><li>[x] </li></ul> | [Article](https://davidsemakula.com/blog/introducing-pallet-verifier) | nice one! | |
| 14 | +| **1** | Rust binary crate | <ul><li>[ ] </li></ul> |[custom rustc driver](https://github.com/davidsemakula/pallet-verifier/blob/master/src/driver.rs), [custom cargo subcommand](https://github.com/davidsemakula/pallet-verifier/blob/master/src/main.rs), [MIRAI integration](https://github.com/davidsemakula/pallet-verifier/blob/master/src/callbacks/verifier.rs) ([see also](https://github.com/davidsemakula/pallet-verifier/blob/844a49f85f434442202f724c2b5a8aecd0cf9d84/src/driver.rs#L144-L168)) and [automatic tractable entry point generation](https://github.com/davidsemakula/pallet-verifier/blob/master/src/callbacks/entry_points.rs) ([see also](https://github.com/davidsemakula/pallet-verifier/blob/844a49f85f434442202f724c2b5a8aecd0cf9d84/src/driver.rs#L124-L142)) | [GitHub repository](https://github.com/davidsemakula/pallet-verifier) | |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## General Notes |
| 20 | +A dockerfile was not a deliverable for this grant. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## Tests |
| 26 | + |
| 27 | +Installing works as described in the readme. |
| 28 | + |
| 29 | +`` Installed package `pallet-verifier v0.1.0 (/home/ubuntu/pallet-verifier)` (executables `cargo-verify-pallet`, `pallet-verifier`)`` |
| 30 | + |
| 31 | +All tests are passing |
| 32 | + |
| 33 | +```` |
| 34 | + Compiling pallet-verifier v0.1.0 (/home/ubuntu/pallet-verifier) |
| 35 | + Finished test [unoptimized + debuginfo] target(s) in 13.15s |
| 36 | + Running tests/compile-test.rs (target/debug/deps/compile_test-f311e992002ca11c) |
| 37 | +Compiler: "PALLET_VERIFIER_NO_COLOR"="true" /home/ubuntu/pallet-verifier/target/debug/pallet-verifier "--error-format=json" "-Zui-testing" "-Aunused" "-Adeprecated" "-Anonstandard_style" "--extern" "mirai_annotations=/home/ubuntu/pallet-verifier/target/debug/deps/libmirai_annotations-1ef028860d685aa4.rlib" "--out-dir" OUT_DIR |
| 38 | +tests/ui/driver/no-specialized-dispatchable-calls.rs ... ok |
| 39 | +tests/ui/driver/missing-dispatchable-definition.rs ... ok |
| 40 | +tests/ui/driver/not-frame-pallet.rs ... ok |
| 41 | +tests/ui/driver/tractable-skeleton-safe-arith-saturating.rs ... ok |
| 42 | +tests/ui/driver/tractable-skeleton-safe-int-cast.rs ... ok |
| 43 | +tests/ui/driver/tractable-skeleton-safe-arith-wrapping.rs ... ok |
| 44 | +tests/ui/driver/tractable-skeleton.rs ... ok |
| 45 | +tests/ui/driver/tractable-skeleton-arith-overflow.rs ... ok |
| 46 | +tests/ui/driver/tractable-skeleton-div-by-zero.rs ... ok |
| 47 | +tests/ui/driver/tractable-skeleton-int-cast-overflow.rs ... ok |
| 48 | +tests/ui/driver/tractable-skeleton-panic.rs ... ok |
| 49 | +
|
| 50 | +test result: ok. 11 passed |
| 51 | +
|
| 52 | +tests/ui/cargo/no-dispatchables/Cargo.toml ... ok |
| 53 | +tests/ui/cargo/minimal-tractable/Cargo.toml ... ok |
| 54 | +tests/ui/cargo/not-frame-pallet/Cargo.toml ... ok |
| 55 | +tests/ui/cargo/minimal-tractable-panic/Cargo.toml ... ok |
| 56 | +tests/ui/cargo/minimal-tractable-arith-overflow/Cargo.toml ... ok |
| 57 | +tests/ui/cargo/minimal-tractable-safe-int-cast/Cargo.toml ... ok |
| 58 | +tests/ui/cargo/minimal-tractable-div-by-zero/Cargo.toml ... ok |
| 59 | +tests/ui/cargo/minimal-tractable-safe-arith-saturating/Cargo.toml ... ok |
| 60 | +tests/ui/cargo/minimal-tractable-int-cast-overflow/Cargo.toml ... ok |
| 61 | +tests/ui/cargo/no-specialized-dispatchable-calls/Cargo.toml ... ok |
| 62 | +
|
| 63 | +test result: ok. 10 passed |
| 64 | +
|
| 65 | +tests/ui/sdk/preimage/Cargo.toml ... ok |
| 66 | +tests/ui/sdk/multisig/Cargo.toml ... ok |
| 67 | +tests/ui/sdk/treasury/Cargo.toml ... ok |
| 68 | +tests/ui/sdk/balances/Cargo.toml ... ok |
| 69 | +tests/ui/sdk/assets/Cargo.toml ... ok |
| 70 | +
|
| 71 | +test result: ok. 5 passed |
| 72 | +```` |
| 73 | + |
| 74 | +## testing Polkadot-SDK pallets |
| 75 | + |
| 76 | +via ``cargo bench`` |
| 77 | + |
| 78 | +all passing. |
| 79 | + |
| 80 | +```` |
| 81 | +Benching pallet-multisig |
| 82 | + Analyzing benches/multisig (sdk version) |
| 83 | + Comment: "possible integer cast overflow" at `multisig/sdk/src/lib.rs:545`, affects `approve_as_multi` and `as_multi` |
| 84 | +
|
| 85 | + dispatchable: `approve_as_multi` ... ok |
| 86 | + 1 expected; 1 found; 1 true positive(s); 0 false positive(s); 0 false negative(s) |
| 87 | + dispatchable: `as_multi` ... ok |
| 88 | + 1 expected; 1 found; 1 true positive(s); 0 false positive(s); 0 false negative(s) |
| 89 | + dispatchable: `as_multi_threshold_1` ... ok |
| 90 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 91 | + dispatchable: `cancel_as_multi` ... ok |
| 92 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 93 | + pub assoc fn: `multi_account_id` ... ok |
| 94 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 95 | + pub assoc fn: `timepoint` ... ok |
| 96 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 97 | +
|
| 98 | + bench result: ok. 6 passed; 0 failed; 2 true positive(s); 0 false positive(s); 0 false negative(s); finished in 69.760s |
| 99 | +
|
| 100 | + Analyzing benches/multisig (edited version) |
| 101 | + Comment: fixes "possible integer cast overflow" at `multisig/edit/src/lib.rs:545` |
| 102 | +
|
| 103 | + dispatchable: `approve_as_multi` ... ok |
| 104 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 105 | + dispatchable: `as_multi` ... ok |
| 106 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 107 | + dispatchable: `as_multi_threshold_1` ... ok |
| 108 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 109 | + dispatchable: `cancel_as_multi` ... ok |
| 110 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 111 | + pub assoc fn: `multi_account_id` ... ok |
| 112 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 113 | + pub assoc fn: `timepoint` ... ok |
| 114 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 115 | +
|
| 116 | + bench result: ok. 6 passed; 0 failed; 0 true positive(s); 0 false positive(s); 0 false negative(s); finished in 68.454s |
| 117 | +
|
| 118 | +
|
| 119 | +Benching pallet-preimage |
| 120 | + Analyzing benches/preimage (sdk version) |
| 121 | + Comment: no diagnostics expected |
| 122 | +
|
| 123 | + dispatchable: `ensure_updated` ... ok |
| 124 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 125 | + dispatchable: `note_preimage` ... ok |
| 126 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 127 | + dispatchable: `request_preimage` ... ok |
| 128 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 129 | + dispatchable: `unnote_preimage` ... ok |
| 130 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 131 | + dispatchable: `unrequest_preimage` ... ok |
| 132 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 133 | +
|
| 134 | + bench result: ok. 5 passed; 0 failed; 0 true positive(s); 0 false positive(s); 0 false negative(s); finished in 68.350s |
| 135 | +
|
| 136 | + Analyzing benches/preimage (edited version) |
| 137 | + Comment: introduces possible panic by replacing `debug_assert!` with `assert!` at `preimage/edit/src/lib.rs:439` |
| 138 | +
|
| 139 | + dispatchable: `ensure_updated` ... ok |
| 140 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 141 | + dispatchable: `note_preimage` ... ok |
| 142 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 143 | + dispatchable: `request_preimage` ... ok |
| 144 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 145 | + dispatchable: `unnote_preimage` ... ok |
| 146 | + 1 expected; 1 found; 1 true positive(s); 0 false positive(s); 0 false negative(s) |
| 147 | + dispatchable: `unrequest_preimage` ... ok |
| 148 | + 1 expected; 1 found; 1 true positive(s); 0 false positive(s); 0 false negative(s) |
| 149 | +
|
| 150 | + bench result: ok. 5 passed; 0 failed; 2 true positive(s); 0 false positive(s); 0 false negative(s); finished in 68.600s |
| 151 | +
|
| 152 | +
|
| 153 | +Benching pallet-treasury |
| 154 | + Analyzing benches/treasury (sdk version) |
| 155 | + Comment: "possible attempt to add with overflow" at: |
| 156 | + - `treasury/sdk/src/lib.rs:637` which affects `spend` |
| 157 | + - `treasury/sdk/src/lib.rs:511` which affects `spend_local` |
| 158 | +
|
| 159 | + dispatchable: `check_status` ... ok |
| 160 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 161 | + dispatchable: `payout` ... ok |
| 162 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 163 | + dispatchable: `remove_approval` ... ok |
| 164 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 165 | + dispatchable: `spend` ... ok |
| 166 | + 1 expected; 1 found; 1 true positive(s); 0 false positive(s); 0 false negative(s) |
| 167 | + dispatchable: `spend_local` ... ok |
| 168 | + 1 expected; 1 found; 1 true positive(s); 0 false positive(s); 0 false negative(s) |
| 169 | + dispatchable: `void_spend` ... ok |
| 170 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 171 | + pub assoc fn: `account_id` ... ok |
| 172 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 173 | + pub assoc fn: `approvals` ... ok |
| 174 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 175 | + pub assoc fn: `pot` ... ok |
| 176 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 177 | + pub assoc fn: `proposal_count` ... ok |
| 178 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 179 | + pub assoc fn: `proposals` ... ok |
| 180 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 181 | + pub assoc fn: `spend_funds` ... ok |
| 182 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 183 | +
|
| 184 | + bench result: ok. 12 passed; 0 failed; 2 true positive(s); 0 false positive(s); 0 false negative(s); finished in 70.473s |
| 185 | +
|
| 186 | + Analyzing benches/treasury (edited version) |
| 187 | + Comment: fixes "possible attempt to add with overflow" at: |
| 188 | + - `treasury/edit/src/lib.rs:637` which affects `spend` |
| 189 | + - `treasury/edit/src/lib.rs:511` which affects `spend_local` |
| 190 | +
|
| 191 | + dispatchable: `check_status` ... ok |
| 192 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 193 | + dispatchable: `payout` ... ok |
| 194 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 195 | + dispatchable: `remove_approval` ... ok |
| 196 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 197 | + dispatchable: `spend` ... ok |
| 198 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 199 | + dispatchable: `spend_local` ... ok |
| 200 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 201 | + dispatchable: `void_spend` ... ok |
| 202 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 203 | + pub assoc fn: `account_id` ... ok |
| 204 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 205 | + pub assoc fn: `approvals` ... ok |
| 206 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 207 | + pub assoc fn: `pot` ... ok |
| 208 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 209 | + pub assoc fn: `proposal_count` ... ok |
| 210 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 211 | + pub assoc fn: `proposals` ... ok |
| 212 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 213 | + pub assoc fn: `spend_funds` ... ok |
| 214 | + 0 expected; 0 found; 0 true positive(s); 0 false positive(s); 0 false negative(s) |
| 215 | +
|
| 216 | + bench result: ok. 12 passed; 0 failed; 0 true positive(s); 0 false positive(s); 0 false negative(s); finished in 71.253s |
| 217 | +
|
| 218 | +
|
| 219 | +total bench result: ok. 46 passed; 0 failed; 0 filtered out; 6 true positive(s); 0 false positive(s); 0 false negative(s); finished in 416.893s |
| 220 | +```` |
| 221 | + |
| 222 | + |
| 223 | + |
0 commit comments