├── .github └── workflows │ └── build.yml ├── .gitignore ├── .vscode └── tasks.json ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── runtime ├── Cargo.toml └── src │ ├── evm.rs │ └── lib.rs ├── rust-toolchain.toml ├── rustfmt.toml ├── scripts └── init.sh ├── shell.nix ├── substrate-sgx ├── externalities │ ├── Cargo.toml │ └── src │ │ ├── bypass.rs │ │ ├── codec_impl.rs │ │ ├── lib.rs │ │ └── vectorize.rs └── sp-io │ ├── Cargo.toml │ └── src │ └── lib.rs └── test-no-std ├── Cargo.toml ├── Makefile └── src └── main.rs /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Check 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ master ] 7 | pull_request: 8 | branches: [ master ] 9 | 10 | env: 11 | CARGO_TERM_COLOR: always 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | container: "integritee/integritee-dev:0.1.7" 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | # We need to compile `test-no-std` separately, otherwise we have std leaks from the build-deps. 21 | check: [ 22 | # exclude the packages that don't compile to std. 23 | cargo check --all --exclude test-no-std, 24 | cargo test --all --exclude test-no-std, 25 | cargo check -p test-no-std, 26 | cargo check -p test-no-std --features evm, 27 | cargo fmt --all -- --check, 28 | ] 29 | steps: 30 | - uses: actions/checkout@v2 31 | - name: init-rust-target 32 | run: rustup show 33 | 34 | - name: ${{ matrix.check }} 35 | run: ${{ matrix.check }} 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | **/target/ 4 | # These are backup files generated by rustfmt 5 | **/*.rs.bk 6 | 7 | .DS_Store 8 | 9 | # The cache for docker container dependency 10 | .cargo 11 | 12 | # The cache for chain data in container 13 | .local 14 | 15 | # vscode 16 | .vscode 17 | 18 | 19 | #CLion 20 | .idea/ 21 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Run ", 8 | "type": "shell", 9 | "command": "cargo", 10 | "args": ["run", "--release", "--", "--dev"], 11 | "group": { 12 | "kind": "build", 13 | "isDefault": true 14 | }, 15 | "presentation": { 16 | "reveal": "always", 17 | "panel": "new" 18 | }, 19 | "problemMatcher": [ 20 | { 21 | "owner": "rust", 22 | "fileLocation": ["relative", "${workspaceRoot}"], 23 | "pattern": { 24 | "regexp": "^(.*):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$", 25 | "file": 1, 26 | "line": 2, 27 | "column": 3, 28 | "endLine": 4, 29 | "endColumn": 5, 30 | "severity": 6, 31 | "message": 7 32 | } 33 | } 34 | ] 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "Inflector" 7 | version = "0.11.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 | dependencies = [ 11 | "lazy_static", 12 | "regex", 13 | ] 14 | 15 | [[package]] 16 | name = "addr2line" 17 | version = "0.17.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" 20 | dependencies = [ 21 | "gimli", 22 | ] 23 | 24 | [[package]] 25 | name = "adler" 26 | version = "1.0.2" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 29 | 30 | [[package]] 31 | name = "ahash" 32 | version = "0.7.6" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 35 | dependencies = [ 36 | "getrandom 0.2.7", 37 | "once_cell", 38 | "version_check", 39 | ] 40 | 41 | [[package]] 42 | name = "aho-corasick" 43 | version = "0.7.18" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 46 | dependencies = [ 47 | "memchr", 48 | ] 49 | 50 | [[package]] 51 | name = "ansi_term" 52 | version = "0.12.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 55 | dependencies = [ 56 | "winapi", 57 | ] 58 | 59 | [[package]] 60 | name = "anyhow" 61 | version = "1.0.60" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142" 64 | 65 | [[package]] 66 | name = "approx" 67 | version = "0.5.1" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" 70 | dependencies = [ 71 | "num-traits", 72 | ] 73 | 74 | [[package]] 75 | name = "arrayref" 76 | version = "0.3.6" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 79 | 80 | [[package]] 81 | name = "arrayvec" 82 | version = "0.4.12" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" 85 | dependencies = [ 86 | "nodrop", 87 | ] 88 | 89 | [[package]] 90 | name = "arrayvec" 91 | version = "0.5.2" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 94 | 95 | [[package]] 96 | name = "arrayvec" 97 | version = "0.7.2" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 100 | 101 | [[package]] 102 | name = "async-trait" 103 | version = "0.1.57" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" 106 | dependencies = [ 107 | "proc-macro2", 108 | "quote", 109 | "syn", 110 | ] 111 | 112 | [[package]] 113 | name = "auto_impl" 114 | version = "0.5.0" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" 117 | dependencies = [ 118 | "proc-macro-error", 119 | "proc-macro2", 120 | "quote", 121 | "syn", 122 | ] 123 | 124 | [[package]] 125 | name = "autocfg" 126 | version = "1.1.0" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 129 | 130 | [[package]] 131 | name = "backtrace" 132 | version = "0.3.66" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" 135 | dependencies = [ 136 | "addr2line", 137 | "cc", 138 | "cfg-if", 139 | "libc", 140 | "miniz_oxide", 141 | "object", 142 | "rustc-demangle", 143 | ] 144 | 145 | [[package]] 146 | name = "base16ct" 147 | version = "0.1.1" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" 150 | 151 | [[package]] 152 | name = "base58" 153 | version = "0.2.0" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" 156 | 157 | [[package]] 158 | name = "base64" 159 | version = "0.13.0" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 162 | 163 | [[package]] 164 | name = "bitflags" 165 | version = "1.3.2" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 168 | 169 | [[package]] 170 | name = "bitvec" 171 | version = "1.0.1" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 174 | dependencies = [ 175 | "funty", 176 | "radium", 177 | "tap", 178 | "wyz", 179 | ] 180 | 181 | [[package]] 182 | name = "blake2" 183 | version = "0.10.4" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" 186 | dependencies = [ 187 | "digest 0.10.3", 188 | ] 189 | 190 | [[package]] 191 | name = "blake2-rfc" 192 | version = "0.2.18" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" 195 | dependencies = [ 196 | "arrayvec 0.4.12", 197 | "constant_time_eq", 198 | ] 199 | 200 | [[package]] 201 | name = "block-buffer" 202 | version = "0.7.3" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" 205 | dependencies = [ 206 | "block-padding", 207 | "byte-tools", 208 | "byteorder", 209 | "generic-array 0.12.4", 210 | ] 211 | 212 | [[package]] 213 | name = "block-buffer" 214 | version = "0.9.0" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 217 | dependencies = [ 218 | "generic-array 0.14.6", 219 | ] 220 | 221 | [[package]] 222 | name = "block-buffer" 223 | version = "0.10.2" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" 226 | dependencies = [ 227 | "generic-array 0.14.6", 228 | ] 229 | 230 | [[package]] 231 | name = "block-padding" 232 | version = "0.1.5" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" 235 | dependencies = [ 236 | "byte-tools", 237 | ] 238 | 239 | [[package]] 240 | name = "bumpalo" 241 | version = "3.10.0" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" 244 | 245 | [[package]] 246 | name = "byte-slice-cast" 247 | version = "1.2.1" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" 250 | 251 | [[package]] 252 | name = "byte-tools" 253 | version = "0.3.1" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" 256 | 257 | [[package]] 258 | name = "byteorder" 259 | version = "1.4.3" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 262 | 263 | [[package]] 264 | name = "bytes" 265 | version = "1.2.1" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 268 | 269 | [[package]] 270 | name = "cc" 271 | version = "1.0.73" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 274 | 275 | [[package]] 276 | name = "cfg-if" 277 | version = "1.0.0" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 280 | 281 | [[package]] 282 | name = "chrono" 283 | version = "0.4.19" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 286 | dependencies = [ 287 | "libc", 288 | "num-integer", 289 | "num-traits", 290 | "winapi", 291 | ] 292 | 293 | [[package]] 294 | name = "const-oid" 295 | version = "0.7.1" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" 298 | 299 | [[package]] 300 | name = "constant_time_eq" 301 | version = "0.1.5" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 304 | 305 | [[package]] 306 | name = "convert_case" 307 | version = "0.4.0" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 310 | 311 | [[package]] 312 | name = "cpufeatures" 313 | version = "0.2.2" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" 316 | dependencies = [ 317 | "libc", 318 | ] 319 | 320 | [[package]] 321 | name = "crunchy" 322 | version = "0.2.2" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 325 | 326 | [[package]] 327 | name = "crypto-bigint" 328 | version = "0.3.2" 329 | source = "registry+https://github.com/rust-lang/crates.io-index" 330 | checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" 331 | dependencies = [ 332 | "generic-array 0.14.6", 333 | "rand_core 0.6.3", 334 | "subtle", 335 | "zeroize", 336 | ] 337 | 338 | [[package]] 339 | name = "crypto-common" 340 | version = "0.1.6" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 343 | dependencies = [ 344 | "generic-array 0.14.6", 345 | "typenum", 346 | ] 347 | 348 | [[package]] 349 | name = "crypto-mac" 350 | version = "0.8.0" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" 353 | dependencies = [ 354 | "generic-array 0.14.6", 355 | "subtle", 356 | ] 357 | 358 | [[package]] 359 | name = "crypto-mac" 360 | version = "0.11.1" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" 363 | dependencies = [ 364 | "generic-array 0.14.6", 365 | "subtle", 366 | ] 367 | 368 | [[package]] 369 | name = "curve25519-dalek" 370 | version = "2.1.3" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" 373 | dependencies = [ 374 | "byteorder", 375 | "digest 0.8.1", 376 | "rand_core 0.5.1", 377 | "subtle", 378 | "zeroize", 379 | ] 380 | 381 | [[package]] 382 | name = "curve25519-dalek" 383 | version = "3.2.0" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" 386 | dependencies = [ 387 | "byteorder", 388 | "digest 0.9.0", 389 | "rand_core 0.5.1", 390 | "subtle", 391 | "zeroize", 392 | ] 393 | 394 | [[package]] 395 | name = "der" 396 | version = "0.5.1" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" 399 | dependencies = [ 400 | "const-oid", 401 | ] 402 | 403 | [[package]] 404 | name = "derive_more" 405 | version = "0.99.17" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 408 | dependencies = [ 409 | "convert_case", 410 | "proc-macro2", 411 | "quote", 412 | "rustc_version 0.4.0", 413 | "syn", 414 | ] 415 | 416 | [[package]] 417 | name = "digest" 418 | version = "0.8.1" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" 421 | dependencies = [ 422 | "generic-array 0.12.4", 423 | ] 424 | 425 | [[package]] 426 | name = "digest" 427 | version = "0.9.0" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 430 | dependencies = [ 431 | "generic-array 0.14.6", 432 | ] 433 | 434 | [[package]] 435 | name = "digest" 436 | version = "0.10.3" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" 439 | dependencies = [ 440 | "block-buffer 0.10.2", 441 | "crypto-common", 442 | "subtle", 443 | ] 444 | 445 | [[package]] 446 | name = "downcast-rs" 447 | version = "1.2.0" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 450 | 451 | [[package]] 452 | name = "dyn-clonable" 453 | version = "0.9.0" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" 456 | dependencies = [ 457 | "dyn-clonable-impl", 458 | "dyn-clone", 459 | ] 460 | 461 | [[package]] 462 | name = "dyn-clonable-impl" 463 | version = "0.9.0" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" 466 | dependencies = [ 467 | "proc-macro2", 468 | "quote", 469 | "syn", 470 | ] 471 | 472 | [[package]] 473 | name = "dyn-clone" 474 | version = "1.0.8" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "9d07a982d1fb29db01e5a59b1918e03da4df7297eaeee7686ac45542fd4e59c8" 477 | 478 | [[package]] 479 | name = "ecdsa" 480 | version = "0.13.4" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" 483 | dependencies = [ 484 | "der", 485 | "elliptic-curve", 486 | "rfc6979", 487 | "signature", 488 | ] 489 | 490 | [[package]] 491 | name = "ed25519" 492 | version = "1.5.2" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" 495 | dependencies = [ 496 | "signature", 497 | ] 498 | 499 | [[package]] 500 | name = "ed25519-dalek" 501 | version = "1.0.1" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" 504 | dependencies = [ 505 | "curve25519-dalek 3.2.0", 506 | "ed25519", 507 | "rand 0.7.3", 508 | "serde", 509 | "sha2 0.9.9", 510 | "zeroize", 511 | ] 512 | 513 | [[package]] 514 | name = "either" 515 | version = "1.7.0" 516 | source = "registry+https://github.com/rust-lang/crates.io-index" 517 | checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" 518 | 519 | [[package]] 520 | name = "elliptic-curve" 521 | version = "0.11.12" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" 524 | dependencies = [ 525 | "base16ct", 526 | "crypto-bigint", 527 | "der", 528 | "ff", 529 | "generic-array 0.14.6", 530 | "group", 531 | "rand_core 0.6.3", 532 | "sec1", 533 | "subtle", 534 | "zeroize", 535 | ] 536 | 537 | [[package]] 538 | name = "environmental" 539 | version = "1.1.3" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" 542 | 543 | [[package]] 544 | name = "ethbloom" 545 | version = "0.12.1" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" 548 | dependencies = [ 549 | "crunchy", 550 | "fixed-hash", 551 | "impl-codec", 552 | "impl-rlp", 553 | "impl-serde", 554 | "scale-info", 555 | "tiny-keccak", 556 | ] 557 | 558 | [[package]] 559 | name = "ethereum" 560 | version = "0.12.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" 563 | dependencies = [ 564 | "bytes", 565 | "ethereum-types", 566 | "hash-db", 567 | "hash256-std-hasher", 568 | "parity-scale-codec", 569 | "rlp", 570 | "rlp-derive", 571 | "scale-info", 572 | "serde", 573 | "sha3", 574 | "triehash", 575 | ] 576 | 577 | [[package]] 578 | name = "ethereum-types" 579 | version = "0.13.1" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" 582 | dependencies = [ 583 | "ethbloom", 584 | "fixed-hash", 585 | "impl-codec", 586 | "impl-rlp", 587 | "impl-serde", 588 | "primitive-types", 589 | "scale-info", 590 | "uint", 591 | ] 592 | 593 | [[package]] 594 | name = "evm" 595 | version = "0.35.0" 596 | source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" 597 | dependencies = [ 598 | "auto_impl", 599 | "environmental", 600 | "ethereum", 601 | "evm-core", 602 | "evm-gasometer", 603 | "evm-runtime", 604 | "log", 605 | "parity-scale-codec", 606 | "primitive-types", 607 | "rlp", 608 | "scale-info", 609 | "serde", 610 | "sha3", 611 | ] 612 | 613 | [[package]] 614 | name = "evm-core" 615 | version = "0.35.0" 616 | source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" 617 | dependencies = [ 618 | "parity-scale-codec", 619 | "primitive-types", 620 | "scale-info", 621 | "serde", 622 | ] 623 | 624 | [[package]] 625 | name = "evm-gasometer" 626 | version = "0.35.0" 627 | source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" 628 | dependencies = [ 629 | "environmental", 630 | "evm-core", 631 | "evm-runtime", 632 | "primitive-types", 633 | ] 634 | 635 | [[package]] 636 | name = "evm-runtime" 637 | version = "0.35.0" 638 | source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" 639 | dependencies = [ 640 | "auto_impl", 641 | "environmental", 642 | "evm-core", 643 | "primitive-types", 644 | "sha3", 645 | ] 646 | 647 | [[package]] 648 | name = "fake-simd" 649 | version = "0.1.2" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" 652 | 653 | [[package]] 654 | name = "ff" 655 | version = "0.11.1" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" 658 | dependencies = [ 659 | "rand_core 0.6.3", 660 | "subtle", 661 | ] 662 | 663 | [[package]] 664 | name = "finality-grandpa" 665 | version = "0.16.0" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" 668 | dependencies = [ 669 | "either", 670 | "futures", 671 | "futures-timer", 672 | "log", 673 | "num-traits", 674 | "parity-scale-codec", 675 | "parking_lot", 676 | "scale-info", 677 | ] 678 | 679 | [[package]] 680 | name = "fixed-hash" 681 | version = "0.7.0" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" 684 | dependencies = [ 685 | "byteorder", 686 | "rand 0.8.5", 687 | "rustc-hex", 688 | "static_assertions", 689 | ] 690 | 691 | [[package]] 692 | name = "fp-evm" 693 | version = "3.0.0-dev" 694 | source = "git+https://github.com/integritee-network/frontier.git?branch=polkadot-v0.9.26#d546e612b0ff10a6edf0b4bc64a68b3c98c8fb5b" 695 | dependencies = [ 696 | "evm", 697 | "frame-support", 698 | "parity-scale-codec", 699 | "serde", 700 | "sp-core", 701 | "sp-std", 702 | ] 703 | 704 | [[package]] 705 | name = "frame-benchmarking" 706 | version = "4.0.0-dev" 707 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 708 | dependencies = [ 709 | "frame-support", 710 | "frame-system", 711 | "linregress", 712 | "log", 713 | "parity-scale-codec", 714 | "paste", 715 | "scale-info", 716 | "serde", 717 | "sp-api", 718 | "sp-application-crypto", 719 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 720 | "sp-runtime", 721 | "sp-runtime-interface", 722 | "sp-std", 723 | "sp-storage", 724 | ] 725 | 726 | [[package]] 727 | name = "frame-executive" 728 | version = "4.0.0-dev" 729 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 730 | dependencies = [ 731 | "frame-support", 732 | "frame-system", 733 | "parity-scale-codec", 734 | "scale-info", 735 | "sp-core", 736 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 737 | "sp-runtime", 738 | "sp-std", 739 | "sp-tracing", 740 | ] 741 | 742 | [[package]] 743 | name = "frame-metadata" 744 | version = "15.0.0" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" 747 | dependencies = [ 748 | "cfg-if", 749 | "parity-scale-codec", 750 | "scale-info", 751 | "serde", 752 | ] 753 | 754 | [[package]] 755 | name = "frame-support" 756 | version = "4.0.0-dev" 757 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 758 | dependencies = [ 759 | "bitflags", 760 | "frame-metadata", 761 | "frame-support-procedural", 762 | "impl-trait-for-tuples", 763 | "k256", 764 | "log", 765 | "once_cell", 766 | "parity-scale-codec", 767 | "paste", 768 | "scale-info", 769 | "serde", 770 | "smallvec", 771 | "sp-arithmetic", 772 | "sp-core", 773 | "sp-core-hashing-proc-macro", 774 | "sp-inherents", 775 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 776 | "sp-runtime", 777 | "sp-staking", 778 | "sp-state-machine", 779 | "sp-std", 780 | "sp-tracing", 781 | "tt-call", 782 | ] 783 | 784 | [[package]] 785 | name = "frame-support-procedural" 786 | version = "4.0.0-dev" 787 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 788 | dependencies = [ 789 | "Inflector", 790 | "frame-support-procedural-tools", 791 | "proc-macro2", 792 | "quote", 793 | "syn", 794 | ] 795 | 796 | [[package]] 797 | name = "frame-support-procedural-tools" 798 | version = "4.0.0-dev" 799 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 800 | dependencies = [ 801 | "frame-support-procedural-tools-derive", 802 | "proc-macro-crate", 803 | "proc-macro2", 804 | "quote", 805 | "syn", 806 | ] 807 | 808 | [[package]] 809 | name = "frame-support-procedural-tools-derive" 810 | version = "3.0.0" 811 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 812 | dependencies = [ 813 | "proc-macro2", 814 | "quote", 815 | "syn", 816 | ] 817 | 818 | [[package]] 819 | name = "frame-system" 820 | version = "4.0.0-dev" 821 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 822 | dependencies = [ 823 | "frame-support", 824 | "log", 825 | "parity-scale-codec", 826 | "scale-info", 827 | "serde", 828 | "sp-core", 829 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 830 | "sp-runtime", 831 | "sp-std", 832 | "sp-version", 833 | ] 834 | 835 | [[package]] 836 | name = "frame-system-benchmarking" 837 | version = "4.0.0-dev" 838 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 839 | dependencies = [ 840 | "frame-benchmarking", 841 | "frame-support", 842 | "frame-system", 843 | "parity-scale-codec", 844 | "scale-info", 845 | "sp-core", 846 | "sp-runtime", 847 | "sp-std", 848 | ] 849 | 850 | [[package]] 851 | name = "frame-system-rpc-runtime-api" 852 | version = "4.0.0-dev" 853 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 854 | dependencies = [ 855 | "parity-scale-codec", 856 | "sp-api", 857 | ] 858 | 859 | [[package]] 860 | name = "funty" 861 | version = "2.0.0" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 864 | 865 | [[package]] 866 | name = "futures" 867 | version = "0.3.21" 868 | source = "registry+https://github.com/rust-lang/crates.io-index" 869 | checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" 870 | dependencies = [ 871 | "futures-channel", 872 | "futures-core", 873 | "futures-executor", 874 | "futures-io", 875 | "futures-sink", 876 | "futures-task", 877 | "futures-util", 878 | ] 879 | 880 | [[package]] 881 | name = "futures-channel" 882 | version = "0.3.21" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" 885 | dependencies = [ 886 | "futures-core", 887 | "futures-sink", 888 | ] 889 | 890 | [[package]] 891 | name = "futures-core" 892 | version = "0.3.21" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" 895 | 896 | [[package]] 897 | name = "futures-executor" 898 | version = "0.3.21" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" 901 | dependencies = [ 902 | "futures-core", 903 | "futures-task", 904 | "futures-util", 905 | "num_cpus", 906 | ] 907 | 908 | [[package]] 909 | name = "futures-io" 910 | version = "0.3.21" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" 913 | 914 | [[package]] 915 | name = "futures-macro" 916 | version = "0.3.21" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" 919 | dependencies = [ 920 | "proc-macro2", 921 | "quote", 922 | "syn", 923 | ] 924 | 925 | [[package]] 926 | name = "futures-sink" 927 | version = "0.3.21" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" 930 | 931 | [[package]] 932 | name = "futures-task" 933 | version = "0.3.21" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" 936 | 937 | [[package]] 938 | name = "futures-timer" 939 | version = "3.0.2" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" 942 | 943 | [[package]] 944 | name = "futures-util" 945 | version = "0.3.21" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" 948 | dependencies = [ 949 | "futures-channel", 950 | "futures-core", 951 | "futures-io", 952 | "futures-macro", 953 | "futures-sink", 954 | "futures-task", 955 | "memchr", 956 | "pin-project-lite", 957 | "pin-utils", 958 | "slab", 959 | ] 960 | 961 | [[package]] 962 | name = "generic-array" 963 | version = "0.12.4" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" 966 | dependencies = [ 967 | "typenum", 968 | ] 969 | 970 | [[package]] 971 | name = "generic-array" 972 | version = "0.14.6" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 975 | dependencies = [ 976 | "typenum", 977 | "version_check", 978 | ] 979 | 980 | [[package]] 981 | name = "getrandom" 982 | version = "0.1.16" 983 | source = "registry+https://github.com/rust-lang/crates.io-index" 984 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 985 | dependencies = [ 986 | "cfg-if", 987 | "js-sys", 988 | "libc", 989 | "wasi 0.9.0+wasi-snapshot-preview1", 990 | "wasm-bindgen", 991 | ] 992 | 993 | [[package]] 994 | name = "getrandom" 995 | version = "0.2.7" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 998 | dependencies = [ 999 | "cfg-if", 1000 | "libc", 1001 | "wasi 0.11.0+wasi-snapshot-preview1", 1002 | ] 1003 | 1004 | [[package]] 1005 | name = "gimli" 1006 | version = "0.26.2" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" 1009 | 1010 | [[package]] 1011 | name = "group" 1012 | version = "0.11.0" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" 1015 | dependencies = [ 1016 | "ff", 1017 | "rand_core 0.6.3", 1018 | "subtle", 1019 | ] 1020 | 1021 | [[package]] 1022 | name = "hash-db" 1023 | version = "0.15.2" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" 1026 | 1027 | [[package]] 1028 | name = "hash256-std-hasher" 1029 | version = "0.15.2" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" 1032 | dependencies = [ 1033 | "crunchy", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "hashbrown" 1038 | version = "0.12.3" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1041 | dependencies = [ 1042 | "ahash", 1043 | ] 1044 | 1045 | [[package]] 1046 | name = "hashbrown_tstd" 1047 | version = "0.12.0" 1048 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 1049 | 1050 | [[package]] 1051 | name = "hermit-abi" 1052 | version = "0.1.19" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1055 | dependencies = [ 1056 | "libc", 1057 | ] 1058 | 1059 | [[package]] 1060 | name = "hex" 1061 | version = "0.4.3" 1062 | source = "registry+https://github.com/rust-lang/crates.io-index" 1063 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1064 | 1065 | [[package]] 1066 | name = "hex-literal" 1067 | version = "0.3.4" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" 1070 | 1071 | [[package]] 1072 | name = "hmac" 1073 | version = "0.8.1" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" 1076 | dependencies = [ 1077 | "crypto-mac 0.8.0", 1078 | "digest 0.9.0", 1079 | ] 1080 | 1081 | [[package]] 1082 | name = "hmac" 1083 | version = "0.11.0" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" 1086 | dependencies = [ 1087 | "crypto-mac 0.11.1", 1088 | "digest 0.9.0", 1089 | ] 1090 | 1091 | [[package]] 1092 | name = "hmac-drbg" 1093 | version = "0.3.0" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" 1096 | dependencies = [ 1097 | "digest 0.9.0", 1098 | "generic-array 0.14.6", 1099 | "hmac 0.8.1", 1100 | ] 1101 | 1102 | [[package]] 1103 | name = "impl-codec" 1104 | version = "0.6.0" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" 1107 | dependencies = [ 1108 | "parity-scale-codec", 1109 | ] 1110 | 1111 | [[package]] 1112 | name = "impl-rlp" 1113 | version = "0.3.0" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" 1116 | dependencies = [ 1117 | "rlp", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "impl-serde" 1122 | version = "0.3.2" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" 1125 | dependencies = [ 1126 | "serde", 1127 | ] 1128 | 1129 | [[package]] 1130 | name = "impl-trait-for-tuples" 1131 | version = "0.2.2" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" 1134 | dependencies = [ 1135 | "proc-macro2", 1136 | "quote", 1137 | "syn", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "integer-sqrt" 1142 | version = "0.1.5" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" 1145 | dependencies = [ 1146 | "num-traits", 1147 | ] 1148 | 1149 | [[package]] 1150 | name = "itoa" 1151 | version = "0.4.8" 1152 | source = "registry+https://github.com/rust-lang/crates.io-index" 1153 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 1154 | 1155 | [[package]] 1156 | name = "itoa" 1157 | version = "1.0.2" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" 1160 | 1161 | [[package]] 1162 | name = "js-sys" 1163 | version = "0.3.59" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" 1166 | dependencies = [ 1167 | "wasm-bindgen", 1168 | ] 1169 | 1170 | [[package]] 1171 | name = "k256" 1172 | version = "0.10.4" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" 1175 | dependencies = [ 1176 | "cfg-if", 1177 | "ecdsa", 1178 | "elliptic-curve", 1179 | "sec1", 1180 | ] 1181 | 1182 | [[package]] 1183 | name = "keccak" 1184 | version = "0.1.2" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" 1187 | 1188 | [[package]] 1189 | name = "lazy_static" 1190 | version = "1.4.0" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1193 | 1194 | [[package]] 1195 | name = "libc" 1196 | version = "0.2.126" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" 1199 | 1200 | [[package]] 1201 | name = "libm" 1202 | version = "0.2.3" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "da83a57f3f5ba3680950aa3cbc806fc297bc0b289d42e8942ed528ace71b8145" 1205 | 1206 | [[package]] 1207 | name = "libsecp256k1" 1208 | version = "0.7.1" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" 1211 | dependencies = [ 1212 | "arrayref", 1213 | "base64", 1214 | "digest 0.9.0", 1215 | "hmac-drbg", 1216 | "libsecp256k1-core", 1217 | "libsecp256k1-gen-ecmult", 1218 | "libsecp256k1-gen-genmult", 1219 | "rand 0.8.5", 1220 | "serde", 1221 | "sha2 0.9.9", 1222 | "typenum", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "libsecp256k1-core" 1227 | version = "0.3.0" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" 1230 | dependencies = [ 1231 | "crunchy", 1232 | "digest 0.9.0", 1233 | "subtle", 1234 | ] 1235 | 1236 | [[package]] 1237 | name = "libsecp256k1-gen-ecmult" 1238 | version = "0.3.0" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" 1241 | dependencies = [ 1242 | "libsecp256k1-core", 1243 | ] 1244 | 1245 | [[package]] 1246 | name = "libsecp256k1-gen-genmult" 1247 | version = "0.3.0" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" 1250 | dependencies = [ 1251 | "libsecp256k1-core", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "linregress" 1256 | version = "0.4.4" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" 1259 | dependencies = [ 1260 | "nalgebra", 1261 | "statrs", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "lock_api" 1266 | version = "0.4.7" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" 1269 | dependencies = [ 1270 | "autocfg", 1271 | "scopeguard", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "log" 1276 | version = "0.4.17" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1279 | dependencies = [ 1280 | "cfg-if", 1281 | ] 1282 | 1283 | [[package]] 1284 | name = "matchers" 1285 | version = "0.0.1" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" 1288 | dependencies = [ 1289 | "regex-automata", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "matrixmultiply" 1294 | version = "0.3.2" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" 1297 | dependencies = [ 1298 | "rawpointer", 1299 | ] 1300 | 1301 | [[package]] 1302 | name = "memchr" 1303 | version = "2.5.0" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1306 | 1307 | [[package]] 1308 | name = "memory-db" 1309 | version = "0.29.0" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" 1312 | dependencies = [ 1313 | "hash-db", 1314 | "hashbrown", 1315 | "parity-util-mem", 1316 | ] 1317 | 1318 | [[package]] 1319 | name = "memory_units" 1320 | version = "0.3.0" 1321 | source = "registry+https://github.com/rust-lang/crates.io-index" 1322 | checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" 1323 | 1324 | [[package]] 1325 | name = "merlin" 1326 | version = "2.0.1" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" 1329 | dependencies = [ 1330 | "byteorder", 1331 | "keccak", 1332 | "rand_core 0.5.1", 1333 | "zeroize", 1334 | ] 1335 | 1336 | [[package]] 1337 | name = "miniz_oxide" 1338 | version = "0.5.3" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" 1341 | dependencies = [ 1342 | "adler", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "nalgebra" 1347 | version = "0.27.1" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" 1350 | dependencies = [ 1351 | "approx", 1352 | "matrixmultiply", 1353 | "nalgebra-macros", 1354 | "num-complex", 1355 | "num-rational 0.4.1", 1356 | "num-traits", 1357 | "rand 0.8.5", 1358 | "rand_distr", 1359 | "simba", 1360 | "typenum", 1361 | ] 1362 | 1363 | [[package]] 1364 | name = "nalgebra-macros" 1365 | version = "0.1.0" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" 1368 | dependencies = [ 1369 | "proc-macro2", 1370 | "quote", 1371 | "syn", 1372 | ] 1373 | 1374 | [[package]] 1375 | name = "nodrop" 1376 | version = "0.1.14" 1377 | source = "registry+https://github.com/rust-lang/crates.io-index" 1378 | checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" 1379 | 1380 | [[package]] 1381 | name = "num-bigint" 1382 | version = "0.2.6" 1383 | source = "registry+https://github.com/rust-lang/crates.io-index" 1384 | checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" 1385 | dependencies = [ 1386 | "autocfg", 1387 | "num-integer", 1388 | "num-traits", 1389 | ] 1390 | 1391 | [[package]] 1392 | name = "num-complex" 1393 | version = "0.4.2" 1394 | source = "registry+https://github.com/rust-lang/crates.io-index" 1395 | checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" 1396 | dependencies = [ 1397 | "num-traits", 1398 | ] 1399 | 1400 | [[package]] 1401 | name = "num-format" 1402 | version = "0.4.0" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" 1405 | dependencies = [ 1406 | "arrayvec 0.4.12", 1407 | "itoa 0.4.8", 1408 | ] 1409 | 1410 | [[package]] 1411 | name = "num-integer" 1412 | version = "0.1.45" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1415 | dependencies = [ 1416 | "autocfg", 1417 | "num-traits", 1418 | ] 1419 | 1420 | [[package]] 1421 | name = "num-rational" 1422 | version = "0.2.4" 1423 | source = "registry+https://github.com/rust-lang/crates.io-index" 1424 | checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" 1425 | dependencies = [ 1426 | "autocfg", 1427 | "num-bigint", 1428 | "num-integer", 1429 | "num-traits", 1430 | ] 1431 | 1432 | [[package]] 1433 | name = "num-rational" 1434 | version = "0.4.1" 1435 | source = "registry+https://github.com/rust-lang/crates.io-index" 1436 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" 1437 | dependencies = [ 1438 | "autocfg", 1439 | "num-integer", 1440 | "num-traits", 1441 | ] 1442 | 1443 | [[package]] 1444 | name = "num-traits" 1445 | version = "0.2.15" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1448 | dependencies = [ 1449 | "autocfg", 1450 | "libm", 1451 | ] 1452 | 1453 | [[package]] 1454 | name = "num_cpus" 1455 | version = "1.13.1" 1456 | source = "registry+https://github.com/rust-lang/crates.io-index" 1457 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 1458 | dependencies = [ 1459 | "hermit-abi", 1460 | "libc", 1461 | ] 1462 | 1463 | [[package]] 1464 | name = "object" 1465 | version = "0.29.0" 1466 | source = "registry+https://github.com/rust-lang/crates.io-index" 1467 | checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" 1468 | dependencies = [ 1469 | "memchr", 1470 | ] 1471 | 1472 | [[package]] 1473 | name = "once_cell" 1474 | version = "1.13.0" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" 1477 | 1478 | [[package]] 1479 | name = "opaque-debug" 1480 | version = "0.2.3" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" 1483 | 1484 | [[package]] 1485 | name = "opaque-debug" 1486 | version = "0.3.0" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 1489 | 1490 | [[package]] 1491 | name = "pallet-aura" 1492 | version = "4.0.0-dev" 1493 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1494 | dependencies = [ 1495 | "frame-support", 1496 | "frame-system", 1497 | "pallet-timestamp", 1498 | "parity-scale-codec", 1499 | "scale-info", 1500 | "sp-application-crypto", 1501 | "sp-consensus-aura", 1502 | "sp-runtime", 1503 | "sp-std", 1504 | ] 1505 | 1506 | [[package]] 1507 | name = "pallet-authorship" 1508 | version = "4.0.0-dev" 1509 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1510 | dependencies = [ 1511 | "frame-support", 1512 | "frame-system", 1513 | "impl-trait-for-tuples", 1514 | "parity-scale-codec", 1515 | "scale-info", 1516 | "sp-authorship", 1517 | "sp-runtime", 1518 | "sp-std", 1519 | ] 1520 | 1521 | [[package]] 1522 | name = "pallet-balances" 1523 | version = "4.0.0-dev" 1524 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1525 | dependencies = [ 1526 | "frame-benchmarking", 1527 | "frame-support", 1528 | "frame-system", 1529 | "log", 1530 | "parity-scale-codec", 1531 | "scale-info", 1532 | "sp-runtime", 1533 | "sp-std", 1534 | ] 1535 | 1536 | [[package]] 1537 | name = "pallet-evm" 1538 | version = "6.0.0-dev" 1539 | source = "git+https://github.com/integritee-network/frontier.git?branch=polkadot-v0.9.26#d546e612b0ff10a6edf0b4bc64a68b3c98c8fb5b" 1540 | dependencies = [ 1541 | "evm", 1542 | "fp-evm", 1543 | "frame-benchmarking", 1544 | "frame-support", 1545 | "frame-system", 1546 | "hex", 1547 | "log", 1548 | "pallet-timestamp", 1549 | "parity-scale-codec", 1550 | "primitive-types", 1551 | "rlp", 1552 | "scale-info", 1553 | "serde", 1554 | "sp-core", 1555 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1556 | "sp-runtime", 1557 | "sp-std", 1558 | ] 1559 | 1560 | [[package]] 1561 | name = "pallet-grandpa" 1562 | version = "4.0.0-dev" 1563 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1564 | dependencies = [ 1565 | "frame-benchmarking", 1566 | "frame-support", 1567 | "frame-system", 1568 | "log", 1569 | "pallet-authorship", 1570 | "pallet-session", 1571 | "parity-scale-codec", 1572 | "scale-info", 1573 | "sp-application-crypto", 1574 | "sp-core", 1575 | "sp-finality-grandpa", 1576 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1577 | "sp-runtime", 1578 | "sp-session", 1579 | "sp-staking", 1580 | "sp-std", 1581 | ] 1582 | 1583 | [[package]] 1584 | name = "pallet-parentchain" 1585 | version = "0.9.0" 1586 | source = "git+https://github.com/integritee-network/pallets.git?branch=master#d70118c28a6039f1cfd181451aca1a553000f0b3" 1587 | dependencies = [ 1588 | "frame-support", 1589 | "frame-system", 1590 | "log", 1591 | "parity-scale-codec", 1592 | "scale-info", 1593 | "serde", 1594 | "sp-core", 1595 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1596 | "sp-runtime", 1597 | "sp-std", 1598 | ] 1599 | 1600 | [[package]] 1601 | name = "pallet-randomness-collective-flip" 1602 | version = "4.0.0-dev" 1603 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1604 | dependencies = [ 1605 | "frame-support", 1606 | "frame-system", 1607 | "parity-scale-codec", 1608 | "safe-mix", 1609 | "scale-info", 1610 | "sp-runtime", 1611 | "sp-std", 1612 | ] 1613 | 1614 | [[package]] 1615 | name = "pallet-session" 1616 | version = "4.0.0-dev" 1617 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1618 | dependencies = [ 1619 | "frame-support", 1620 | "frame-system", 1621 | "impl-trait-for-tuples", 1622 | "log", 1623 | "pallet-timestamp", 1624 | "parity-scale-codec", 1625 | "scale-info", 1626 | "sp-core", 1627 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1628 | "sp-runtime", 1629 | "sp-session", 1630 | "sp-staking", 1631 | "sp-std", 1632 | "sp-trie", 1633 | ] 1634 | 1635 | [[package]] 1636 | name = "pallet-sudo" 1637 | version = "4.0.0-dev" 1638 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1639 | dependencies = [ 1640 | "frame-support", 1641 | "frame-system", 1642 | "parity-scale-codec", 1643 | "scale-info", 1644 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1645 | "sp-runtime", 1646 | "sp-std", 1647 | ] 1648 | 1649 | [[package]] 1650 | name = "pallet-timestamp" 1651 | version = "4.0.0-dev" 1652 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1653 | dependencies = [ 1654 | "frame-benchmarking", 1655 | "frame-support", 1656 | "frame-system", 1657 | "log", 1658 | "parity-scale-codec", 1659 | "scale-info", 1660 | "sp-inherents", 1661 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1662 | "sp-runtime", 1663 | "sp-std", 1664 | "sp-timestamp", 1665 | ] 1666 | 1667 | [[package]] 1668 | name = "pallet-transaction-payment" 1669 | version = "4.0.0-dev" 1670 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1671 | dependencies = [ 1672 | "frame-support", 1673 | "frame-system", 1674 | "parity-scale-codec", 1675 | "scale-info", 1676 | "serde", 1677 | "sp-core", 1678 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 1679 | "sp-runtime", 1680 | "sp-std", 1681 | ] 1682 | 1683 | [[package]] 1684 | name = "pallet-transaction-payment-rpc-runtime-api" 1685 | version = "4.0.0-dev" 1686 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 1687 | dependencies = [ 1688 | "pallet-transaction-payment", 1689 | "parity-scale-codec", 1690 | "sp-api", 1691 | "sp-runtime", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "parity-scale-codec" 1696 | version = "3.1.5" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" 1699 | dependencies = [ 1700 | "arrayvec 0.7.2", 1701 | "bitvec", 1702 | "byte-slice-cast", 1703 | "impl-trait-for-tuples", 1704 | "parity-scale-codec-derive", 1705 | "serde", 1706 | ] 1707 | 1708 | [[package]] 1709 | name = "parity-scale-codec-derive" 1710 | version = "3.1.3" 1711 | source = "registry+https://github.com/rust-lang/crates.io-index" 1712 | checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" 1713 | dependencies = [ 1714 | "proc-macro-crate", 1715 | "proc-macro2", 1716 | "quote", 1717 | "syn", 1718 | ] 1719 | 1720 | [[package]] 1721 | name = "parity-util-mem" 1722 | version = "0.11.0" 1723 | source = "registry+https://github.com/rust-lang/crates.io-index" 1724 | checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" 1725 | dependencies = [ 1726 | "cfg-if", 1727 | "hashbrown", 1728 | "impl-trait-for-tuples", 1729 | "parity-util-mem-derive", 1730 | "parking_lot", 1731 | "primitive-types", 1732 | "winapi", 1733 | ] 1734 | 1735 | [[package]] 1736 | name = "parity-util-mem-derive" 1737 | version = "0.1.0" 1738 | source = "registry+https://github.com/rust-lang/crates.io-index" 1739 | checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" 1740 | dependencies = [ 1741 | "proc-macro2", 1742 | "syn", 1743 | "synstructure", 1744 | ] 1745 | 1746 | [[package]] 1747 | name = "parity-wasm" 1748 | version = "0.42.2" 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" 1750 | checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" 1751 | 1752 | [[package]] 1753 | name = "parking_lot" 1754 | version = "0.12.1" 1755 | source = "registry+https://github.com/rust-lang/crates.io-index" 1756 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1757 | dependencies = [ 1758 | "lock_api", 1759 | "parking_lot_core", 1760 | ] 1761 | 1762 | [[package]] 1763 | name = "parking_lot_core" 1764 | version = "0.9.3" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 1767 | dependencies = [ 1768 | "cfg-if", 1769 | "libc", 1770 | "redox_syscall", 1771 | "smallvec", 1772 | "windows-sys", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "paste" 1777 | version = "1.0.8" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22" 1780 | 1781 | [[package]] 1782 | name = "pbkdf2" 1783 | version = "0.4.0" 1784 | source = "registry+https://github.com/rust-lang/crates.io-index" 1785 | checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" 1786 | dependencies = [ 1787 | "crypto-mac 0.8.0", 1788 | ] 1789 | 1790 | [[package]] 1791 | name = "pbkdf2" 1792 | version = "0.8.0" 1793 | source = "registry+https://github.com/rust-lang/crates.io-index" 1794 | checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" 1795 | dependencies = [ 1796 | "crypto-mac 0.11.1", 1797 | ] 1798 | 1799 | [[package]] 1800 | name = "pin-project-lite" 1801 | version = "0.2.9" 1802 | source = "registry+https://github.com/rust-lang/crates.io-index" 1803 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1804 | 1805 | [[package]] 1806 | name = "pin-utils" 1807 | version = "0.1.0" 1808 | source = "registry+https://github.com/rust-lang/crates.io-index" 1809 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1810 | 1811 | [[package]] 1812 | name = "postcard" 1813 | version = "0.7.3" 1814 | source = "registry+https://github.com/rust-lang/crates.io-index" 1815 | checksum = "a25c0b0ae06fcffe600ad392aabfa535696c8973f2253d9ac83171924c58a858" 1816 | dependencies = [ 1817 | "postcard-cobs", 1818 | "serde", 1819 | ] 1820 | 1821 | [[package]] 1822 | name = "postcard-cobs" 1823 | version = "0.1.5-pre" 1824 | source = "registry+https://github.com/rust-lang/crates.io-index" 1825 | checksum = "7c68cb38ed13fd7bc9dd5db8f165b7c8d9c1a315104083a2b10f11354c2af97f" 1826 | 1827 | [[package]] 1828 | name = "ppv-lite86" 1829 | version = "0.2.16" 1830 | source = "registry+https://github.com/rust-lang/crates.io-index" 1831 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1832 | 1833 | [[package]] 1834 | name = "primitive-types" 1835 | version = "0.11.1" 1836 | source = "registry+https://github.com/rust-lang/crates.io-index" 1837 | checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" 1838 | dependencies = [ 1839 | "fixed-hash", 1840 | "impl-codec", 1841 | "impl-rlp", 1842 | "impl-serde", 1843 | "scale-info", 1844 | "uint", 1845 | ] 1846 | 1847 | [[package]] 1848 | name = "proc-macro-crate" 1849 | version = "1.2.0" 1850 | source = "registry+https://github.com/rust-lang/crates.io-index" 1851 | checksum = "26d50bfb8c23f23915855a00d98b5a35ef2e0b871bb52937bacadb798fbb66c8" 1852 | dependencies = [ 1853 | "once_cell", 1854 | "thiserror", 1855 | "toml", 1856 | ] 1857 | 1858 | [[package]] 1859 | name = "proc-macro-error" 1860 | version = "1.0.4" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1863 | dependencies = [ 1864 | "proc-macro-error-attr", 1865 | "proc-macro2", 1866 | "quote", 1867 | "syn", 1868 | "version_check", 1869 | ] 1870 | 1871 | [[package]] 1872 | name = "proc-macro-error-attr" 1873 | version = "1.0.4" 1874 | source = "registry+https://github.com/rust-lang/crates.io-index" 1875 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1876 | dependencies = [ 1877 | "proc-macro2", 1878 | "quote", 1879 | "version_check", 1880 | ] 1881 | 1882 | [[package]] 1883 | name = "proc-macro2" 1884 | version = "1.0.43" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" 1887 | dependencies = [ 1888 | "unicode-ident", 1889 | ] 1890 | 1891 | [[package]] 1892 | name = "quote" 1893 | version = "1.0.21" 1894 | source = "registry+https://github.com/rust-lang/crates.io-index" 1895 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1896 | dependencies = [ 1897 | "proc-macro2", 1898 | ] 1899 | 1900 | [[package]] 1901 | name = "radium" 1902 | version = "0.7.0" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 1905 | 1906 | [[package]] 1907 | name = "rand" 1908 | version = "0.7.3" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1911 | dependencies = [ 1912 | "getrandom 0.1.16", 1913 | "libc", 1914 | "rand_chacha 0.2.2", 1915 | "rand_core 0.5.1", 1916 | "rand_hc", 1917 | "rand_pcg", 1918 | ] 1919 | 1920 | [[package]] 1921 | name = "rand" 1922 | version = "0.8.5" 1923 | source = "registry+https://github.com/rust-lang/crates.io-index" 1924 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1925 | dependencies = [ 1926 | "libc", 1927 | "rand_chacha 0.3.1", 1928 | "rand_core 0.6.3", 1929 | ] 1930 | 1931 | [[package]] 1932 | name = "rand_chacha" 1933 | version = "0.2.2" 1934 | source = "registry+https://github.com/rust-lang/crates.io-index" 1935 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1936 | dependencies = [ 1937 | "ppv-lite86", 1938 | "rand_core 0.5.1", 1939 | ] 1940 | 1941 | [[package]] 1942 | name = "rand_chacha" 1943 | version = "0.3.1" 1944 | source = "registry+https://github.com/rust-lang/crates.io-index" 1945 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1946 | dependencies = [ 1947 | "ppv-lite86", 1948 | "rand_core 0.6.3", 1949 | ] 1950 | 1951 | [[package]] 1952 | name = "rand_core" 1953 | version = "0.5.1" 1954 | source = "registry+https://github.com/rust-lang/crates.io-index" 1955 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1956 | dependencies = [ 1957 | "getrandom 0.1.16", 1958 | ] 1959 | 1960 | [[package]] 1961 | name = "rand_core" 1962 | version = "0.6.3" 1963 | source = "registry+https://github.com/rust-lang/crates.io-index" 1964 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1965 | dependencies = [ 1966 | "getrandom 0.2.7", 1967 | ] 1968 | 1969 | [[package]] 1970 | name = "rand_distr" 1971 | version = "0.4.3" 1972 | source = "registry+https://github.com/rust-lang/crates.io-index" 1973 | checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" 1974 | dependencies = [ 1975 | "num-traits", 1976 | "rand 0.8.5", 1977 | ] 1978 | 1979 | [[package]] 1980 | name = "rand_hc" 1981 | version = "0.2.0" 1982 | source = "registry+https://github.com/rust-lang/crates.io-index" 1983 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1984 | dependencies = [ 1985 | "rand_core 0.5.1", 1986 | ] 1987 | 1988 | [[package]] 1989 | name = "rand_pcg" 1990 | version = "0.2.1" 1991 | source = "registry+https://github.com/rust-lang/crates.io-index" 1992 | checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" 1993 | dependencies = [ 1994 | "rand_core 0.5.1", 1995 | ] 1996 | 1997 | [[package]] 1998 | name = "rawpointer" 1999 | version = "0.2.1" 2000 | source = "registry+https://github.com/rust-lang/crates.io-index" 2001 | checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" 2002 | 2003 | [[package]] 2004 | name = "redox_syscall" 2005 | version = "0.2.16" 2006 | source = "registry+https://github.com/rust-lang/crates.io-index" 2007 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 2008 | dependencies = [ 2009 | "bitflags", 2010 | ] 2011 | 2012 | [[package]] 2013 | name = "ref-cast" 2014 | version = "1.0.8" 2015 | source = "registry+https://github.com/rust-lang/crates.io-index" 2016 | checksum = "776c8940430cf563f66a93f9111d1cd39306dc6c68149ecc6b934742a44a828a" 2017 | dependencies = [ 2018 | "ref-cast-impl", 2019 | ] 2020 | 2021 | [[package]] 2022 | name = "ref-cast-impl" 2023 | version = "1.0.8" 2024 | source = "registry+https://github.com/rust-lang/crates.io-index" 2025 | checksum = "5f26c4704460286103bff62ea1fb78d137febc86aaf76952e6c5a2249af01f54" 2026 | dependencies = [ 2027 | "proc-macro2", 2028 | "quote", 2029 | "syn", 2030 | ] 2031 | 2032 | [[package]] 2033 | name = "regex" 2034 | version = "1.6.0" 2035 | source = "registry+https://github.com/rust-lang/crates.io-index" 2036 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 2037 | dependencies = [ 2038 | "aho-corasick", 2039 | "memchr", 2040 | "regex-syntax", 2041 | ] 2042 | 2043 | [[package]] 2044 | name = "regex-automata" 2045 | version = "0.1.10" 2046 | source = "registry+https://github.com/rust-lang/crates.io-index" 2047 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 2048 | dependencies = [ 2049 | "regex-syntax", 2050 | ] 2051 | 2052 | [[package]] 2053 | name = "regex-syntax" 2054 | version = "0.6.27" 2055 | source = "registry+https://github.com/rust-lang/crates.io-index" 2056 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 2057 | 2058 | [[package]] 2059 | name = "rfc6979" 2060 | version = "0.1.0" 2061 | source = "registry+https://github.com/rust-lang/crates.io-index" 2062 | checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" 2063 | dependencies = [ 2064 | "crypto-bigint", 2065 | "hmac 0.11.0", 2066 | "zeroize", 2067 | ] 2068 | 2069 | [[package]] 2070 | name = "rlp" 2071 | version = "0.5.1" 2072 | source = "registry+https://github.com/rust-lang/crates.io-index" 2073 | checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" 2074 | dependencies = [ 2075 | "bytes", 2076 | "rustc-hex", 2077 | ] 2078 | 2079 | [[package]] 2080 | name = "rlp-derive" 2081 | version = "0.1.0" 2082 | source = "registry+https://github.com/rust-lang/crates.io-index" 2083 | checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" 2084 | dependencies = [ 2085 | "proc-macro2", 2086 | "quote", 2087 | "syn", 2088 | ] 2089 | 2090 | [[package]] 2091 | name = "rustc-demangle" 2092 | version = "0.1.21" 2093 | source = "registry+https://github.com/rust-lang/crates.io-index" 2094 | checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" 2095 | 2096 | [[package]] 2097 | name = "rustc-hash" 2098 | version = "1.1.0" 2099 | source = "registry+https://github.com/rust-lang/crates.io-index" 2100 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 2101 | 2102 | [[package]] 2103 | name = "rustc-hex" 2104 | version = "2.1.0" 2105 | source = "registry+https://github.com/rust-lang/crates.io-index" 2106 | checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" 2107 | 2108 | [[package]] 2109 | name = "rustc_version" 2110 | version = "0.2.3" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 2113 | dependencies = [ 2114 | "semver 0.9.0", 2115 | ] 2116 | 2117 | [[package]] 2118 | name = "rustc_version" 2119 | version = "0.4.0" 2120 | source = "registry+https://github.com/rust-lang/crates.io-index" 2121 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 2122 | dependencies = [ 2123 | "semver 1.0.13", 2124 | ] 2125 | 2126 | [[package]] 2127 | name = "ryu" 2128 | version = "1.0.11" 2129 | source = "registry+https://github.com/rust-lang/crates.io-index" 2130 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 2131 | 2132 | [[package]] 2133 | name = "safe-mix" 2134 | version = "1.0.1" 2135 | source = "registry+https://github.com/rust-lang/crates.io-index" 2136 | checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" 2137 | dependencies = [ 2138 | "rustc_version 0.2.3", 2139 | ] 2140 | 2141 | [[package]] 2142 | name = "scale-info" 2143 | version = "2.1.2" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" 2146 | dependencies = [ 2147 | "bitvec", 2148 | "cfg-if", 2149 | "derive_more", 2150 | "parity-scale-codec", 2151 | "scale-info-derive", 2152 | "serde", 2153 | ] 2154 | 2155 | [[package]] 2156 | name = "scale-info-derive" 2157 | version = "2.1.2" 2158 | source = "registry+https://github.com/rust-lang/crates.io-index" 2159 | checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c" 2160 | dependencies = [ 2161 | "proc-macro-crate", 2162 | "proc-macro2", 2163 | "quote", 2164 | "syn", 2165 | ] 2166 | 2167 | [[package]] 2168 | name = "schnorrkel" 2169 | version = "0.9.1" 2170 | source = "registry+https://github.com/rust-lang/crates.io-index" 2171 | checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" 2172 | dependencies = [ 2173 | "arrayref", 2174 | "arrayvec 0.5.2", 2175 | "curve25519-dalek 2.1.3", 2176 | "getrandom 0.1.16", 2177 | "merlin", 2178 | "rand 0.7.3", 2179 | "rand_core 0.5.1", 2180 | "sha2 0.8.2", 2181 | "subtle", 2182 | "zeroize", 2183 | ] 2184 | 2185 | [[package]] 2186 | name = "scopeguard" 2187 | version = "1.1.0" 2188 | source = "registry+https://github.com/rust-lang/crates.io-index" 2189 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2190 | 2191 | [[package]] 2192 | name = "sec1" 2193 | version = "0.2.1" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" 2196 | dependencies = [ 2197 | "der", 2198 | "generic-array 0.14.6", 2199 | "subtle", 2200 | "zeroize", 2201 | ] 2202 | 2203 | [[package]] 2204 | name = "secp256k1" 2205 | version = "0.21.3" 2206 | source = "registry+https://github.com/rust-lang/crates.io-index" 2207 | checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" 2208 | dependencies = [ 2209 | "secp256k1-sys", 2210 | ] 2211 | 2212 | [[package]] 2213 | name = "secp256k1-sys" 2214 | version = "0.4.2" 2215 | source = "registry+https://github.com/rust-lang/crates.io-index" 2216 | checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" 2217 | dependencies = [ 2218 | "cc", 2219 | ] 2220 | 2221 | [[package]] 2222 | name = "secrecy" 2223 | version = "0.8.0" 2224 | source = "registry+https://github.com/rust-lang/crates.io-index" 2225 | checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" 2226 | dependencies = [ 2227 | "zeroize", 2228 | ] 2229 | 2230 | [[package]] 2231 | name = "semver" 2232 | version = "0.9.0" 2233 | source = "registry+https://github.com/rust-lang/crates.io-index" 2234 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 2235 | dependencies = [ 2236 | "semver-parser", 2237 | ] 2238 | 2239 | [[package]] 2240 | name = "semver" 2241 | version = "1.0.13" 2242 | source = "registry+https://github.com/rust-lang/crates.io-index" 2243 | checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" 2244 | 2245 | [[package]] 2246 | name = "semver-parser" 2247 | version = "0.7.0" 2248 | source = "registry+https://github.com/rust-lang/crates.io-index" 2249 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 2250 | 2251 | [[package]] 2252 | name = "serde" 2253 | version = "1.0.141" 2254 | source = "registry+https://github.com/rust-lang/crates.io-index" 2255 | checksum = "7af873f2c95b99fcb0bd0fe622a43e29514658873c8ceba88c4cb88833a22500" 2256 | dependencies = [ 2257 | "serde_derive", 2258 | ] 2259 | 2260 | [[package]] 2261 | name = "serde_derive" 2262 | version = "1.0.141" 2263 | source = "registry+https://github.com/rust-lang/crates.io-index" 2264 | checksum = "75743a150d003dd863b51dc809bcad0d73f2102c53632f1e954e738192a3413f" 2265 | dependencies = [ 2266 | "proc-macro2", 2267 | "quote", 2268 | "syn", 2269 | ] 2270 | 2271 | [[package]] 2272 | name = "serde_json" 2273 | version = "1.0.82" 2274 | source = "registry+https://github.com/rust-lang/crates.io-index" 2275 | checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" 2276 | dependencies = [ 2277 | "itoa 1.0.2", 2278 | "ryu", 2279 | "serde", 2280 | ] 2281 | 2282 | [[package]] 2283 | name = "sgx-externalities" 2284 | version = "0.4.0" 2285 | dependencies = [ 2286 | "derive_more", 2287 | "environmental", 2288 | "log", 2289 | "parity-scale-codec", 2290 | "postcard", 2291 | "serde", 2292 | "sgx_tstd", 2293 | "sgx_types", 2294 | ] 2295 | 2296 | [[package]] 2297 | name = "sgx-runtime" 2298 | version = "0.8.0" 2299 | dependencies = [ 2300 | "frame-benchmarking", 2301 | "frame-executive", 2302 | "frame-support", 2303 | "frame-system", 2304 | "frame-system-benchmarking", 2305 | "frame-system-rpc-runtime-api", 2306 | "hex-literal", 2307 | "pallet-aura", 2308 | "pallet-balances", 2309 | "pallet-evm", 2310 | "pallet-grandpa", 2311 | "pallet-parentchain", 2312 | "pallet-randomness-collective-flip", 2313 | "pallet-sudo", 2314 | "pallet-timestamp", 2315 | "pallet-transaction-payment", 2316 | "pallet-transaction-payment-rpc-runtime-api", 2317 | "parity-scale-codec", 2318 | "scale-info", 2319 | "serde", 2320 | "sp-api", 2321 | "sp-block-builder", 2322 | "sp-consensus-aura", 2323 | "sp-core", 2324 | "sp-inherents", 2325 | "sp-offchain", 2326 | "sp-runtime", 2327 | "sp-session", 2328 | "sp-std", 2329 | "sp-transaction-pool", 2330 | "sp-version", 2331 | ] 2332 | 2333 | [[package]] 2334 | name = "sgx_alloc" 2335 | version = "1.1.5" 2336 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2337 | 2338 | [[package]] 2339 | name = "sgx_backtrace_sys" 2340 | version = "1.1.5" 2341 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2342 | dependencies = [ 2343 | "cc", 2344 | "sgx_build_helper", 2345 | "sgx_libc", 2346 | ] 2347 | 2348 | [[package]] 2349 | name = "sgx_build_helper" 2350 | version = "1.1.5" 2351 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2352 | 2353 | [[package]] 2354 | name = "sgx_demangle" 2355 | version = "1.1.5" 2356 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2357 | 2358 | [[package]] 2359 | name = "sgx_libc" 2360 | version = "1.1.5" 2361 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2362 | dependencies = [ 2363 | "sgx_types", 2364 | ] 2365 | 2366 | [[package]] 2367 | name = "sgx_tprotected_fs" 2368 | version = "1.1.5" 2369 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2370 | dependencies = [ 2371 | "sgx_trts", 2372 | "sgx_types", 2373 | ] 2374 | 2375 | [[package]] 2376 | name = "sgx_trts" 2377 | version = "1.1.5" 2378 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2379 | dependencies = [ 2380 | "sgx_libc", 2381 | "sgx_types", 2382 | ] 2383 | 2384 | [[package]] 2385 | name = "sgx_tstd" 2386 | version = "1.1.5" 2387 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2388 | dependencies = [ 2389 | "hashbrown_tstd", 2390 | "sgx_alloc", 2391 | "sgx_backtrace_sys", 2392 | "sgx_demangle", 2393 | "sgx_libc", 2394 | "sgx_tprotected_fs", 2395 | "sgx_trts", 2396 | "sgx_types", 2397 | "sgx_unwind", 2398 | ] 2399 | 2400 | [[package]] 2401 | name = "sgx_types" 2402 | version = "1.1.5" 2403 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2404 | 2405 | [[package]] 2406 | name = "sgx_unwind" 2407 | version = "1.1.5" 2408 | source = "git+https://github.com/apache/teaclave-sgx-sdk.git?branch=master#d2d339cbb005f676bb700059bd51dc689c025f6b" 2409 | dependencies = [ 2410 | "sgx_build_helper", 2411 | ] 2412 | 2413 | [[package]] 2414 | name = "sha2" 2415 | version = "0.8.2" 2416 | source = "registry+https://github.com/rust-lang/crates.io-index" 2417 | checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" 2418 | dependencies = [ 2419 | "block-buffer 0.7.3", 2420 | "digest 0.8.1", 2421 | "fake-simd", 2422 | "opaque-debug 0.2.3", 2423 | ] 2424 | 2425 | [[package]] 2426 | name = "sha2" 2427 | version = "0.9.9" 2428 | source = "registry+https://github.com/rust-lang/crates.io-index" 2429 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 2430 | dependencies = [ 2431 | "block-buffer 0.9.0", 2432 | "cfg-if", 2433 | "cpufeatures", 2434 | "digest 0.9.0", 2435 | "opaque-debug 0.3.0", 2436 | ] 2437 | 2438 | [[package]] 2439 | name = "sha2" 2440 | version = "0.10.2" 2441 | source = "registry+https://github.com/rust-lang/crates.io-index" 2442 | checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" 2443 | dependencies = [ 2444 | "cfg-if", 2445 | "cpufeatures", 2446 | "digest 0.10.3", 2447 | ] 2448 | 2449 | [[package]] 2450 | name = "sha3" 2451 | version = "0.10.2" 2452 | source = "registry+https://github.com/rust-lang/crates.io-index" 2453 | checksum = "0a31480366ec990f395a61b7c08122d99bd40544fdb5abcfc1b06bb29994312c" 2454 | dependencies = [ 2455 | "digest 0.10.3", 2456 | "keccak", 2457 | ] 2458 | 2459 | [[package]] 2460 | name = "sharded-slab" 2461 | version = "0.1.4" 2462 | source = "registry+https://github.com/rust-lang/crates.io-index" 2463 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" 2464 | dependencies = [ 2465 | "lazy_static", 2466 | ] 2467 | 2468 | [[package]] 2469 | name = "signature" 2470 | version = "1.4.0" 2471 | source = "registry+https://github.com/rust-lang/crates.io-index" 2472 | checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" 2473 | dependencies = [ 2474 | "digest 0.9.0", 2475 | "rand_core 0.6.3", 2476 | ] 2477 | 2478 | [[package]] 2479 | name = "simba" 2480 | version = "0.5.1" 2481 | source = "registry+https://github.com/rust-lang/crates.io-index" 2482 | checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" 2483 | dependencies = [ 2484 | "approx", 2485 | "num-complex", 2486 | "num-traits", 2487 | "paste", 2488 | ] 2489 | 2490 | [[package]] 2491 | name = "slab" 2492 | version = "0.4.7" 2493 | source = "registry+https://github.com/rust-lang/crates.io-index" 2494 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 2495 | dependencies = [ 2496 | "autocfg", 2497 | ] 2498 | 2499 | [[package]] 2500 | name = "smallvec" 2501 | version = "1.9.0" 2502 | source = "registry+https://github.com/rust-lang/crates.io-index" 2503 | checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" 2504 | 2505 | [[package]] 2506 | name = "sp-api" 2507 | version = "4.0.0-dev" 2508 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2509 | dependencies = [ 2510 | "hash-db", 2511 | "log", 2512 | "parity-scale-codec", 2513 | "sp-api-proc-macro", 2514 | "sp-core", 2515 | "sp-runtime", 2516 | "sp-state-machine", 2517 | "sp-std", 2518 | "sp-version", 2519 | "thiserror", 2520 | ] 2521 | 2522 | [[package]] 2523 | name = "sp-api-proc-macro" 2524 | version = "4.0.0-dev" 2525 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2526 | dependencies = [ 2527 | "blake2", 2528 | "proc-macro-crate", 2529 | "proc-macro2", 2530 | "quote", 2531 | "syn", 2532 | ] 2533 | 2534 | [[package]] 2535 | name = "sp-application-crypto" 2536 | version = "6.0.0" 2537 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2538 | dependencies = [ 2539 | "parity-scale-codec", 2540 | "scale-info", 2541 | "serde", 2542 | "sp-core", 2543 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 2544 | "sp-std", 2545 | ] 2546 | 2547 | [[package]] 2548 | name = "sp-arithmetic" 2549 | version = "5.0.0" 2550 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2551 | dependencies = [ 2552 | "integer-sqrt", 2553 | "num-traits", 2554 | "parity-scale-codec", 2555 | "scale-info", 2556 | "serde", 2557 | "sp-debug-derive", 2558 | "sp-std", 2559 | "static_assertions", 2560 | ] 2561 | 2562 | [[package]] 2563 | name = "sp-authorship" 2564 | version = "4.0.0-dev" 2565 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2566 | dependencies = [ 2567 | "async-trait", 2568 | "parity-scale-codec", 2569 | "sp-inherents", 2570 | "sp-runtime", 2571 | "sp-std", 2572 | ] 2573 | 2574 | [[package]] 2575 | name = "sp-block-builder" 2576 | version = "4.0.0-dev" 2577 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2578 | dependencies = [ 2579 | "parity-scale-codec", 2580 | "sp-api", 2581 | "sp-inherents", 2582 | "sp-runtime", 2583 | "sp-std", 2584 | ] 2585 | 2586 | [[package]] 2587 | name = "sp-consensus" 2588 | version = "0.10.0-dev" 2589 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2590 | dependencies = [ 2591 | "async-trait", 2592 | "futures", 2593 | "futures-timer", 2594 | "log", 2595 | "parity-scale-codec", 2596 | "sp-core", 2597 | "sp-inherents", 2598 | "sp-runtime", 2599 | "sp-state-machine", 2600 | "sp-std", 2601 | "sp-version", 2602 | "thiserror", 2603 | ] 2604 | 2605 | [[package]] 2606 | name = "sp-consensus-aura" 2607 | version = "0.10.0-dev" 2608 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2609 | dependencies = [ 2610 | "async-trait", 2611 | "parity-scale-codec", 2612 | "scale-info", 2613 | "sp-api", 2614 | "sp-application-crypto", 2615 | "sp-consensus", 2616 | "sp-consensus-slots", 2617 | "sp-inherents", 2618 | "sp-runtime", 2619 | "sp-std", 2620 | "sp-timestamp", 2621 | ] 2622 | 2623 | [[package]] 2624 | name = "sp-consensus-slots" 2625 | version = "0.10.0-dev" 2626 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2627 | dependencies = [ 2628 | "parity-scale-codec", 2629 | "scale-info", 2630 | "serde", 2631 | "sp-arithmetic", 2632 | "sp-runtime", 2633 | "sp-std", 2634 | "sp-timestamp", 2635 | ] 2636 | 2637 | [[package]] 2638 | name = "sp-core" 2639 | version = "6.0.0" 2640 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2641 | dependencies = [ 2642 | "base58", 2643 | "bitflags", 2644 | "blake2-rfc", 2645 | "byteorder", 2646 | "dyn-clonable", 2647 | "ed25519-dalek", 2648 | "futures", 2649 | "hash-db", 2650 | "hash256-std-hasher", 2651 | "hex", 2652 | "impl-serde", 2653 | "lazy_static", 2654 | "libsecp256k1", 2655 | "log", 2656 | "merlin", 2657 | "num-traits", 2658 | "parity-scale-codec", 2659 | "parity-util-mem", 2660 | "parking_lot", 2661 | "primitive-types", 2662 | "rand 0.7.3", 2663 | "regex", 2664 | "scale-info", 2665 | "schnorrkel", 2666 | "secp256k1", 2667 | "secrecy", 2668 | "serde", 2669 | "sp-core-hashing", 2670 | "sp-debug-derive", 2671 | "sp-externalities", 2672 | "sp-runtime-interface", 2673 | "sp-std", 2674 | "sp-storage", 2675 | "ss58-registry", 2676 | "substrate-bip39", 2677 | "thiserror", 2678 | "tiny-bip39", 2679 | "wasmi", 2680 | "zeroize", 2681 | ] 2682 | 2683 | [[package]] 2684 | name = "sp-core-hashing" 2685 | version = "4.0.0" 2686 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2687 | dependencies = [ 2688 | "blake2", 2689 | "byteorder", 2690 | "digest 0.10.3", 2691 | "sha2 0.10.2", 2692 | "sha3", 2693 | "sp-std", 2694 | "twox-hash", 2695 | ] 2696 | 2697 | [[package]] 2698 | name = "sp-core-hashing-proc-macro" 2699 | version = "5.0.0" 2700 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2701 | dependencies = [ 2702 | "proc-macro2", 2703 | "quote", 2704 | "sp-core-hashing", 2705 | "syn", 2706 | ] 2707 | 2708 | [[package]] 2709 | name = "sp-debug-derive" 2710 | version = "4.0.0" 2711 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2712 | dependencies = [ 2713 | "proc-macro2", 2714 | "quote", 2715 | "syn", 2716 | ] 2717 | 2718 | [[package]] 2719 | name = "sp-externalities" 2720 | version = "0.12.0" 2721 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2722 | dependencies = [ 2723 | "environmental", 2724 | "parity-scale-codec", 2725 | "sp-std", 2726 | "sp-storage", 2727 | ] 2728 | 2729 | [[package]] 2730 | name = "sp-finality-grandpa" 2731 | version = "4.0.0-dev" 2732 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2733 | dependencies = [ 2734 | "finality-grandpa", 2735 | "log", 2736 | "parity-scale-codec", 2737 | "scale-info", 2738 | "serde", 2739 | "sp-api", 2740 | "sp-application-crypto", 2741 | "sp-core", 2742 | "sp-keystore", 2743 | "sp-runtime", 2744 | "sp-std", 2745 | ] 2746 | 2747 | [[package]] 2748 | name = "sp-inherents" 2749 | version = "4.0.0-dev" 2750 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2751 | dependencies = [ 2752 | "async-trait", 2753 | "impl-trait-for-tuples", 2754 | "parity-scale-codec", 2755 | "sp-core", 2756 | "sp-runtime", 2757 | "sp-std", 2758 | "thiserror", 2759 | ] 2760 | 2761 | [[package]] 2762 | name = "sp-io" 2763 | version = "6.0.0" 2764 | dependencies = [ 2765 | "environmental", 2766 | "futures", 2767 | "hash-db", 2768 | "hex-literal", 2769 | "libsecp256k1", 2770 | "log", 2771 | "parity-scale-codec", 2772 | "parking_lot", 2773 | "sgx-externalities", 2774 | "sgx_tstd", 2775 | "sgx_types", 2776 | "sp-core", 2777 | "sp-externalities", 2778 | "sp-keystore", 2779 | "sp-runtime-interface", 2780 | "sp-state-machine", 2781 | "sp-std", 2782 | "sp-tracing", 2783 | "sp-trie", 2784 | "sp-wasm-interface", 2785 | "tracing", 2786 | "tracing-core", 2787 | ] 2788 | 2789 | [[package]] 2790 | name = "sp-io" 2791 | version = "6.0.0" 2792 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2793 | dependencies = [ 2794 | "futures", 2795 | "hash-db", 2796 | "libsecp256k1", 2797 | "log", 2798 | "parity-scale-codec", 2799 | "parking_lot", 2800 | "secp256k1", 2801 | "sp-core", 2802 | "sp-externalities", 2803 | "sp-keystore", 2804 | "sp-runtime-interface", 2805 | "sp-state-machine", 2806 | "sp-std", 2807 | "sp-tracing", 2808 | "sp-trie", 2809 | "sp-wasm-interface", 2810 | "tracing", 2811 | "tracing-core", 2812 | ] 2813 | 2814 | [[package]] 2815 | name = "sp-keystore" 2816 | version = "0.12.0" 2817 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2818 | dependencies = [ 2819 | "async-trait", 2820 | "futures", 2821 | "merlin", 2822 | "parity-scale-codec", 2823 | "parking_lot", 2824 | "schnorrkel", 2825 | "serde", 2826 | "sp-core", 2827 | "sp-externalities", 2828 | "thiserror", 2829 | ] 2830 | 2831 | [[package]] 2832 | name = "sp-offchain" 2833 | version = "4.0.0-dev" 2834 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2835 | dependencies = [ 2836 | "sp-api", 2837 | "sp-core", 2838 | "sp-runtime", 2839 | ] 2840 | 2841 | [[package]] 2842 | name = "sp-panic-handler" 2843 | version = "4.0.0" 2844 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2845 | dependencies = [ 2846 | "backtrace", 2847 | "lazy_static", 2848 | "regex", 2849 | ] 2850 | 2851 | [[package]] 2852 | name = "sp-runtime" 2853 | version = "6.0.0" 2854 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2855 | dependencies = [ 2856 | "either", 2857 | "hash256-std-hasher", 2858 | "impl-trait-for-tuples", 2859 | "log", 2860 | "parity-scale-codec", 2861 | "parity-util-mem", 2862 | "paste", 2863 | "rand 0.7.3", 2864 | "scale-info", 2865 | "serde", 2866 | "sp-application-crypto", 2867 | "sp-arithmetic", 2868 | "sp-core", 2869 | "sp-io 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26)", 2870 | "sp-std", 2871 | ] 2872 | 2873 | [[package]] 2874 | name = "sp-runtime-interface" 2875 | version = "6.0.0" 2876 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2877 | dependencies = [ 2878 | "impl-trait-for-tuples", 2879 | "parity-scale-codec", 2880 | "primitive-types", 2881 | "sp-externalities", 2882 | "sp-runtime-interface-proc-macro", 2883 | "sp-std", 2884 | "sp-storage", 2885 | "sp-tracing", 2886 | "sp-wasm-interface", 2887 | "static_assertions", 2888 | ] 2889 | 2890 | [[package]] 2891 | name = "sp-runtime-interface-proc-macro" 2892 | version = "5.0.0" 2893 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2894 | dependencies = [ 2895 | "Inflector", 2896 | "proc-macro-crate", 2897 | "proc-macro2", 2898 | "quote", 2899 | "syn", 2900 | ] 2901 | 2902 | [[package]] 2903 | name = "sp-session" 2904 | version = "4.0.0-dev" 2905 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2906 | dependencies = [ 2907 | "parity-scale-codec", 2908 | "scale-info", 2909 | "sp-api", 2910 | "sp-core", 2911 | "sp-runtime", 2912 | "sp-staking", 2913 | "sp-std", 2914 | ] 2915 | 2916 | [[package]] 2917 | name = "sp-staking" 2918 | version = "4.0.0-dev" 2919 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2920 | dependencies = [ 2921 | "parity-scale-codec", 2922 | "scale-info", 2923 | "sp-runtime", 2924 | "sp-std", 2925 | ] 2926 | 2927 | [[package]] 2928 | name = "sp-state-machine" 2929 | version = "0.12.0" 2930 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2931 | dependencies = [ 2932 | "hash-db", 2933 | "log", 2934 | "num-traits", 2935 | "parity-scale-codec", 2936 | "parking_lot", 2937 | "rand 0.7.3", 2938 | "smallvec", 2939 | "sp-core", 2940 | "sp-externalities", 2941 | "sp-panic-handler", 2942 | "sp-std", 2943 | "sp-trie", 2944 | "thiserror", 2945 | "tracing", 2946 | "trie-root", 2947 | ] 2948 | 2949 | [[package]] 2950 | name = "sp-std" 2951 | version = "4.0.0" 2952 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2953 | 2954 | [[package]] 2955 | name = "sp-storage" 2956 | version = "6.0.0" 2957 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2958 | dependencies = [ 2959 | "impl-serde", 2960 | "parity-scale-codec", 2961 | "ref-cast", 2962 | "serde", 2963 | "sp-debug-derive", 2964 | "sp-std", 2965 | ] 2966 | 2967 | [[package]] 2968 | name = "sp-timestamp" 2969 | version = "4.0.0-dev" 2970 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2971 | dependencies = [ 2972 | "async-trait", 2973 | "futures-timer", 2974 | "log", 2975 | "parity-scale-codec", 2976 | "sp-api", 2977 | "sp-inherents", 2978 | "sp-runtime", 2979 | "sp-std", 2980 | "thiserror", 2981 | ] 2982 | 2983 | [[package]] 2984 | name = "sp-tracing" 2985 | version = "5.0.0" 2986 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2987 | dependencies = [ 2988 | "parity-scale-codec", 2989 | "sp-std", 2990 | "tracing", 2991 | "tracing-core", 2992 | "tracing-subscriber", 2993 | ] 2994 | 2995 | [[package]] 2996 | name = "sp-transaction-pool" 2997 | version = "4.0.0-dev" 2998 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 2999 | dependencies = [ 3000 | "sp-api", 3001 | "sp-runtime", 3002 | ] 3003 | 3004 | [[package]] 3005 | name = "sp-trie" 3006 | version = "6.0.0" 3007 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 3008 | dependencies = [ 3009 | "hash-db", 3010 | "memory-db", 3011 | "parity-scale-codec", 3012 | "scale-info", 3013 | "sp-core", 3014 | "sp-std", 3015 | "thiserror", 3016 | "trie-db", 3017 | "trie-root", 3018 | ] 3019 | 3020 | [[package]] 3021 | name = "sp-version" 3022 | version = "5.0.0" 3023 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 3024 | dependencies = [ 3025 | "impl-serde", 3026 | "parity-scale-codec", 3027 | "parity-wasm", 3028 | "scale-info", 3029 | "serde", 3030 | "sp-core-hashing-proc-macro", 3031 | "sp-runtime", 3032 | "sp-std", 3033 | "sp-version-proc-macro", 3034 | "thiserror", 3035 | ] 3036 | 3037 | [[package]] 3038 | name = "sp-version-proc-macro" 3039 | version = "4.0.0-dev" 3040 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 3041 | dependencies = [ 3042 | "parity-scale-codec", 3043 | "proc-macro2", 3044 | "quote", 3045 | "syn", 3046 | ] 3047 | 3048 | [[package]] 3049 | name = "sp-wasm-interface" 3050 | version = "6.0.0" 3051 | source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" 3052 | dependencies = [ 3053 | "impl-trait-for-tuples", 3054 | "log", 3055 | "parity-scale-codec", 3056 | "sp-std", 3057 | "wasmi", 3058 | ] 3059 | 3060 | [[package]] 3061 | name = "ss58-registry" 3062 | version = "1.25.0" 3063 | source = "registry+https://github.com/rust-lang/crates.io-index" 3064 | checksum = "a039906277e0d8db996cd9d1ef19278c10209d994ecfc1025ced16342873a17c" 3065 | dependencies = [ 3066 | "Inflector", 3067 | "num-format", 3068 | "proc-macro2", 3069 | "quote", 3070 | "serde", 3071 | "serde_json", 3072 | "unicode-xid", 3073 | ] 3074 | 3075 | [[package]] 3076 | name = "static_assertions" 3077 | version = "1.1.0" 3078 | source = "registry+https://github.com/rust-lang/crates.io-index" 3079 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 3080 | 3081 | [[package]] 3082 | name = "statrs" 3083 | version = "0.15.0" 3084 | source = "registry+https://github.com/rust-lang/crates.io-index" 3085 | checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" 3086 | dependencies = [ 3087 | "approx", 3088 | "lazy_static", 3089 | "nalgebra", 3090 | "num-traits", 3091 | "rand 0.8.5", 3092 | ] 3093 | 3094 | [[package]] 3095 | name = "substrate-bip39" 3096 | version = "0.4.4" 3097 | source = "registry+https://github.com/rust-lang/crates.io-index" 3098 | checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" 3099 | dependencies = [ 3100 | "hmac 0.11.0", 3101 | "pbkdf2 0.8.0", 3102 | "schnorrkel", 3103 | "sha2 0.9.9", 3104 | "zeroize", 3105 | ] 3106 | 3107 | [[package]] 3108 | name = "subtle" 3109 | version = "2.4.1" 3110 | source = "registry+https://github.com/rust-lang/crates.io-index" 3111 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 3112 | 3113 | [[package]] 3114 | name = "syn" 3115 | version = "1.0.99" 3116 | source = "registry+https://github.com/rust-lang/crates.io-index" 3117 | checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" 3118 | dependencies = [ 3119 | "proc-macro2", 3120 | "quote", 3121 | "unicode-ident", 3122 | ] 3123 | 3124 | [[package]] 3125 | name = "synstructure" 3126 | version = "0.12.6" 3127 | source = "registry+https://github.com/rust-lang/crates.io-index" 3128 | checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" 3129 | dependencies = [ 3130 | "proc-macro2", 3131 | "quote", 3132 | "syn", 3133 | "unicode-xid", 3134 | ] 3135 | 3136 | [[package]] 3137 | name = "tap" 3138 | version = "1.0.1" 3139 | source = "registry+https://github.com/rust-lang/crates.io-index" 3140 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 3141 | 3142 | [[package]] 3143 | name = "test-no-std" 3144 | version = "0.1.0" 3145 | dependencies = [ 3146 | "libc", 3147 | "sgx-runtime", 3148 | "sgx_tstd", 3149 | "sp-application-crypto", 3150 | "sp-core", 3151 | "sp-io 6.0.0", 3152 | ] 3153 | 3154 | [[package]] 3155 | name = "thiserror" 3156 | version = "1.0.32" 3157 | source = "registry+https://github.com/rust-lang/crates.io-index" 3158 | checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" 3159 | dependencies = [ 3160 | "thiserror-impl", 3161 | ] 3162 | 3163 | [[package]] 3164 | name = "thiserror-impl" 3165 | version = "1.0.32" 3166 | source = "registry+https://github.com/rust-lang/crates.io-index" 3167 | checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" 3168 | dependencies = [ 3169 | "proc-macro2", 3170 | "quote", 3171 | "syn", 3172 | ] 3173 | 3174 | [[package]] 3175 | name = "thread_local" 3176 | version = "1.1.4" 3177 | source = "registry+https://github.com/rust-lang/crates.io-index" 3178 | checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" 3179 | dependencies = [ 3180 | "once_cell", 3181 | ] 3182 | 3183 | [[package]] 3184 | name = "tiny-bip39" 3185 | version = "0.8.2" 3186 | source = "registry+https://github.com/rust-lang/crates.io-index" 3187 | checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" 3188 | dependencies = [ 3189 | "anyhow", 3190 | "hmac 0.8.1", 3191 | "once_cell", 3192 | "pbkdf2 0.4.0", 3193 | "rand 0.7.3", 3194 | "rustc-hash", 3195 | "sha2 0.9.9", 3196 | "thiserror", 3197 | "unicode-normalization", 3198 | "wasm-bindgen", 3199 | "zeroize", 3200 | ] 3201 | 3202 | [[package]] 3203 | name = "tiny-keccak" 3204 | version = "2.0.2" 3205 | source = "registry+https://github.com/rust-lang/crates.io-index" 3206 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 3207 | dependencies = [ 3208 | "crunchy", 3209 | ] 3210 | 3211 | [[package]] 3212 | name = "tinyvec" 3213 | version = "1.6.0" 3214 | source = "registry+https://github.com/rust-lang/crates.io-index" 3215 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 3216 | dependencies = [ 3217 | "tinyvec_macros", 3218 | ] 3219 | 3220 | [[package]] 3221 | name = "tinyvec_macros" 3222 | version = "0.1.0" 3223 | source = "registry+https://github.com/rust-lang/crates.io-index" 3224 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 3225 | 3226 | [[package]] 3227 | name = "toml" 3228 | version = "0.5.9" 3229 | source = "registry+https://github.com/rust-lang/crates.io-index" 3230 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 3231 | dependencies = [ 3232 | "serde", 3233 | ] 3234 | 3235 | [[package]] 3236 | name = "tracing" 3237 | version = "0.1.36" 3238 | source = "registry+https://github.com/rust-lang/crates.io-index" 3239 | checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" 3240 | dependencies = [ 3241 | "cfg-if", 3242 | "pin-project-lite", 3243 | "tracing-attributes", 3244 | "tracing-core", 3245 | ] 3246 | 3247 | [[package]] 3248 | name = "tracing-attributes" 3249 | version = "0.1.22" 3250 | source = "registry+https://github.com/rust-lang/crates.io-index" 3251 | checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" 3252 | dependencies = [ 3253 | "proc-macro2", 3254 | "quote", 3255 | "syn", 3256 | ] 3257 | 3258 | [[package]] 3259 | name = "tracing-core" 3260 | version = "0.1.29" 3261 | source = "registry+https://github.com/rust-lang/crates.io-index" 3262 | checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" 3263 | dependencies = [ 3264 | "once_cell", 3265 | "valuable", 3266 | ] 3267 | 3268 | [[package]] 3269 | name = "tracing-log" 3270 | version = "0.1.3" 3271 | source = "registry+https://github.com/rust-lang/crates.io-index" 3272 | checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" 3273 | dependencies = [ 3274 | "lazy_static", 3275 | "log", 3276 | "tracing-core", 3277 | ] 3278 | 3279 | [[package]] 3280 | name = "tracing-serde" 3281 | version = "0.1.3" 3282 | source = "registry+https://github.com/rust-lang/crates.io-index" 3283 | checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" 3284 | dependencies = [ 3285 | "serde", 3286 | "tracing-core", 3287 | ] 3288 | 3289 | [[package]] 3290 | name = "tracing-subscriber" 3291 | version = "0.2.25" 3292 | source = "registry+https://github.com/rust-lang/crates.io-index" 3293 | checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" 3294 | dependencies = [ 3295 | "ansi_term", 3296 | "chrono", 3297 | "lazy_static", 3298 | "matchers", 3299 | "regex", 3300 | "serde", 3301 | "serde_json", 3302 | "sharded-slab", 3303 | "smallvec", 3304 | "thread_local", 3305 | "tracing", 3306 | "tracing-core", 3307 | "tracing-log", 3308 | "tracing-serde", 3309 | ] 3310 | 3311 | [[package]] 3312 | name = "trie-db" 3313 | version = "0.23.1" 3314 | source = "registry+https://github.com/rust-lang/crates.io-index" 3315 | checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" 3316 | dependencies = [ 3317 | "hash-db", 3318 | "hashbrown", 3319 | "log", 3320 | "rustc-hex", 3321 | "smallvec", 3322 | ] 3323 | 3324 | [[package]] 3325 | name = "trie-root" 3326 | version = "0.17.0" 3327 | source = "registry+https://github.com/rust-lang/crates.io-index" 3328 | checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" 3329 | dependencies = [ 3330 | "hash-db", 3331 | ] 3332 | 3333 | [[package]] 3334 | name = "triehash" 3335 | version = "0.8.4" 3336 | source = "registry+https://github.com/rust-lang/crates.io-index" 3337 | checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" 3338 | dependencies = [ 3339 | "hash-db", 3340 | "rlp", 3341 | ] 3342 | 3343 | [[package]] 3344 | name = "tt-call" 3345 | version = "1.0.8" 3346 | source = "registry+https://github.com/rust-lang/crates.io-index" 3347 | checksum = "5e66dcbec4290c69dd03c57e76c2469ea5c7ce109c6dd4351c13055cf71ea055" 3348 | 3349 | [[package]] 3350 | name = "twox-hash" 3351 | version = "1.6.3" 3352 | source = "registry+https://github.com/rust-lang/crates.io-index" 3353 | checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" 3354 | dependencies = [ 3355 | "cfg-if", 3356 | "digest 0.10.3", 3357 | "rand 0.8.5", 3358 | "static_assertions", 3359 | ] 3360 | 3361 | [[package]] 3362 | name = "typenum" 3363 | version = "1.15.0" 3364 | source = "registry+https://github.com/rust-lang/crates.io-index" 3365 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 3366 | 3367 | [[package]] 3368 | name = "uint" 3369 | version = "0.9.3" 3370 | source = "registry+https://github.com/rust-lang/crates.io-index" 3371 | checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" 3372 | dependencies = [ 3373 | "byteorder", 3374 | "crunchy", 3375 | "hex", 3376 | "static_assertions", 3377 | ] 3378 | 3379 | [[package]] 3380 | name = "unicode-ident" 3381 | version = "1.0.2" 3382 | source = "registry+https://github.com/rust-lang/crates.io-index" 3383 | checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" 3384 | 3385 | [[package]] 3386 | name = "unicode-normalization" 3387 | version = "0.1.21" 3388 | source = "registry+https://github.com/rust-lang/crates.io-index" 3389 | checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" 3390 | dependencies = [ 3391 | "tinyvec", 3392 | ] 3393 | 3394 | [[package]] 3395 | name = "unicode-xid" 3396 | version = "0.2.3" 3397 | source = "registry+https://github.com/rust-lang/crates.io-index" 3398 | checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" 3399 | 3400 | [[package]] 3401 | name = "valuable" 3402 | version = "0.1.0" 3403 | source = "registry+https://github.com/rust-lang/crates.io-index" 3404 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 3405 | 3406 | [[package]] 3407 | name = "version_check" 3408 | version = "0.9.4" 3409 | source = "registry+https://github.com/rust-lang/crates.io-index" 3410 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 3411 | 3412 | [[package]] 3413 | name = "wasi" 3414 | version = "0.9.0+wasi-snapshot-preview1" 3415 | source = "registry+https://github.com/rust-lang/crates.io-index" 3416 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 3417 | 3418 | [[package]] 3419 | name = "wasi" 3420 | version = "0.11.0+wasi-snapshot-preview1" 3421 | source = "registry+https://github.com/rust-lang/crates.io-index" 3422 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 3423 | 3424 | [[package]] 3425 | name = "wasm-bindgen" 3426 | version = "0.2.82" 3427 | source = "registry+https://github.com/rust-lang/crates.io-index" 3428 | checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" 3429 | dependencies = [ 3430 | "cfg-if", 3431 | "wasm-bindgen-macro", 3432 | ] 3433 | 3434 | [[package]] 3435 | name = "wasm-bindgen-backend" 3436 | version = "0.2.82" 3437 | source = "registry+https://github.com/rust-lang/crates.io-index" 3438 | checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" 3439 | dependencies = [ 3440 | "bumpalo", 3441 | "log", 3442 | "once_cell", 3443 | "proc-macro2", 3444 | "quote", 3445 | "syn", 3446 | "wasm-bindgen-shared", 3447 | ] 3448 | 3449 | [[package]] 3450 | name = "wasm-bindgen-macro" 3451 | version = "0.2.82" 3452 | source = "registry+https://github.com/rust-lang/crates.io-index" 3453 | checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" 3454 | dependencies = [ 3455 | "quote", 3456 | "wasm-bindgen-macro-support", 3457 | ] 3458 | 3459 | [[package]] 3460 | name = "wasm-bindgen-macro-support" 3461 | version = "0.2.82" 3462 | source = "registry+https://github.com/rust-lang/crates.io-index" 3463 | checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" 3464 | dependencies = [ 3465 | "proc-macro2", 3466 | "quote", 3467 | "syn", 3468 | "wasm-bindgen-backend", 3469 | "wasm-bindgen-shared", 3470 | ] 3471 | 3472 | [[package]] 3473 | name = "wasm-bindgen-shared" 3474 | version = "0.2.82" 3475 | source = "registry+https://github.com/rust-lang/crates.io-index" 3476 | checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" 3477 | 3478 | [[package]] 3479 | name = "wasmi" 3480 | version = "0.9.1" 3481 | source = "registry+https://github.com/rust-lang/crates.io-index" 3482 | checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" 3483 | dependencies = [ 3484 | "downcast-rs", 3485 | "libc", 3486 | "memory_units", 3487 | "num-rational 0.2.4", 3488 | "num-traits", 3489 | "parity-wasm", 3490 | "wasmi-validation", 3491 | ] 3492 | 3493 | [[package]] 3494 | name = "wasmi-validation" 3495 | version = "0.4.1" 3496 | source = "registry+https://github.com/rust-lang/crates.io-index" 3497 | checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" 3498 | dependencies = [ 3499 | "parity-wasm", 3500 | ] 3501 | 3502 | [[package]] 3503 | name = "winapi" 3504 | version = "0.3.9" 3505 | source = "registry+https://github.com/rust-lang/crates.io-index" 3506 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3507 | dependencies = [ 3508 | "winapi-i686-pc-windows-gnu", 3509 | "winapi-x86_64-pc-windows-gnu", 3510 | ] 3511 | 3512 | [[package]] 3513 | name = "winapi-i686-pc-windows-gnu" 3514 | version = "0.4.0" 3515 | source = "registry+https://github.com/rust-lang/crates.io-index" 3516 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3517 | 3518 | [[package]] 3519 | name = "winapi-x86_64-pc-windows-gnu" 3520 | version = "0.4.0" 3521 | source = "registry+https://github.com/rust-lang/crates.io-index" 3522 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3523 | 3524 | [[package]] 3525 | name = "windows-sys" 3526 | version = "0.36.1" 3527 | source = "registry+https://github.com/rust-lang/crates.io-index" 3528 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 3529 | dependencies = [ 3530 | "windows_aarch64_msvc", 3531 | "windows_i686_gnu", 3532 | "windows_i686_msvc", 3533 | "windows_x86_64_gnu", 3534 | "windows_x86_64_msvc", 3535 | ] 3536 | 3537 | [[package]] 3538 | name = "windows_aarch64_msvc" 3539 | version = "0.36.1" 3540 | source = "registry+https://github.com/rust-lang/crates.io-index" 3541 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 3542 | 3543 | [[package]] 3544 | name = "windows_i686_gnu" 3545 | version = "0.36.1" 3546 | source = "registry+https://github.com/rust-lang/crates.io-index" 3547 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 3548 | 3549 | [[package]] 3550 | name = "windows_i686_msvc" 3551 | version = "0.36.1" 3552 | source = "registry+https://github.com/rust-lang/crates.io-index" 3553 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 3554 | 3555 | [[package]] 3556 | name = "windows_x86_64_gnu" 3557 | version = "0.36.1" 3558 | source = "registry+https://github.com/rust-lang/crates.io-index" 3559 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 3560 | 3561 | [[package]] 3562 | name = "windows_x86_64_msvc" 3563 | version = "0.36.1" 3564 | source = "registry+https://github.com/rust-lang/crates.io-index" 3565 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 3566 | 3567 | [[package]] 3568 | name = "wyz" 3569 | version = "0.5.0" 3570 | source = "registry+https://github.com/rust-lang/crates.io-index" 3571 | checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" 3572 | dependencies = [ 3573 | "tap", 3574 | ] 3575 | 3576 | [[package]] 3577 | name = "zeroize" 3578 | version = "1.5.7" 3579 | source = "registry+https://github.com/rust-lang/crates.io-index" 3580 | checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" 3581 | dependencies = [ 3582 | "zeroize_derive", 3583 | ] 3584 | 3585 | [[package]] 3586 | name = "zeroize_derive" 3587 | version = "1.3.2" 3588 | source = "registry+https://github.com/rust-lang/crates.io-index" 3589 | checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" 3590 | dependencies = [ 3591 | "proc-macro2", 3592 | "quote", 3593 | "syn", 3594 | "synstructure", 3595 | ] 3596 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | 4 | members = [ 5 | 'runtime', 6 | 'substrate-sgx/sp-io', 7 | 'substrate-sgx/externalities', 8 | 'test-no-std' 9 | ] 10 | 11 | [profile.release] 12 | panic = 'unwind' 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > The code of this repo has been moved to the [worker repository](https://github.com/integritee-network/worker). 2 | 3 | # SGX-Runtime 4 | 5 | Based on [Integritee Node Template](https://github.com/integritee-network/integritee-node) 6 | 7 | This substrate runtime is instantiated inside a Intel SGX enclave in the [Integritee framework](https://book.integritee.network/). Probably all substrate compatible pallets can be integrated and executed confidentially. 8 | 9 | This repo also hosts our SGX patches for `sp-io` and `externalities`. 10 | 11 | # test build 12 | 13 | This crate is meant to be used in SGX environment and may not build on its own. 14 | Therefore, this repo contains a test crate setting up SGX tstd. Build it with: 15 | 16 | ``` 17 | cd test_no_std 18 | export SGX_SDK=/opt/intel/sgxsdk 19 | make 20 | ``` 21 | If it builds without `std` collisions, you're good. Linker errors can be safely ignored. 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /runtime/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["Integritee AG "] 3 | edition = '2021' 4 | homepage = 'https://www.integritee.network/' 5 | license = 'Unlicense' 6 | name = 'sgx-runtime' 7 | repository = 'https://github.com/integritee-network/sgx-runtime/' 8 | version = '0.8.0' 9 | 10 | [package.metadata.docs.rs] 11 | targets = ['x86_64-unknown-linux-gnu'] 12 | 13 | [dependencies] 14 | hex-literal = { version = '0.3.4', optional = true } 15 | serde = { version = '1.0.101' , optional = true, features = ['derive'] } 16 | # alias "parity-scale-code" to "codec" 17 | codec = { package = 'parity-scale-codec', version = "3.0.0", default-features = false, features = ['derive']} 18 | scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } 19 | 20 | # Substrate dependencies 21 | frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 22 | frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 23 | frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 24 | frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 25 | frame-system-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 26 | frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 27 | pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 28 | pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 29 | pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 30 | pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 31 | pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 32 | pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 33 | pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 34 | pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 35 | sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 36 | sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 37 | sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 38 | sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 39 | sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 40 | sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 41 | sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 42 | sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 43 | sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 44 | sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 45 | sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 46 | 47 | # Integritee dependencies 48 | pallet-parentchain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "master" } 49 | pallet-evm = { default-features = false, optional = true, git = "https://github.com/integritee-network/frontier.git", branch = "polkadot-v0.9.26" } 50 | 51 | [features] 52 | default = ['std'] 53 | # Compile the sgx-runtime with evm-pallet support in `no_std`. 54 | evm = ["pallet-evm"] 55 | # Compile the sgx-runtime with evm-pallet support in `std`. 56 | evm_std = [ 57 | 'evm', # Activate the `feature = evm` for the compiler flags. 58 | 'pallet-evm/std' 59 | ] 60 | runtime-benchmarks = [ 61 | 'hex-literal', 62 | 'frame-benchmarking', 63 | 'frame-support/runtime-benchmarks', 64 | 'frame-system-benchmarking', 65 | 'frame-system/runtime-benchmarks', 66 | 'pallet-balances/runtime-benchmarks', 67 | 'pallet-timestamp/runtime-benchmarks', 68 | 'sp-runtime/runtime-benchmarks', 69 | ] 70 | std = [ 71 | 'codec/std', 72 | 'scale-info/std', 73 | 'serde', 74 | 'frame-executive/std', 75 | 'frame-support/std', 76 | 'frame-system/std', 77 | 'frame-system-rpc-runtime-api/std', 78 | 'pallet-aura/std', 79 | 'pallet-balances/std', 80 | 'pallet-grandpa/std', 81 | 'pallet-randomness-collective-flip/std', 82 | 'pallet-sudo/std', 83 | 'pallet-timestamp/std', 84 | 'pallet-transaction-payment/std', 85 | 'pallet-transaction-payment-rpc-runtime-api/std', 86 | 'pallet-parentchain/std', 87 | 'sp-api/std', 88 | 'sp-block-builder/std', 89 | 'sp-consensus-aura/std', 90 | 'sp-core/std', 91 | 'sp-inherents/std', 92 | 'sp-offchain/std', 93 | 'sp-runtime/std', 94 | 'sp-session/std', 95 | 'sp-std/std', 96 | 'sp-transaction-pool/std', 97 | 'sp-version/std', 98 | ] 99 | -------------------------------------------------------------------------------- /runtime/src/evm.rs: -------------------------------------------------------------------------------- 1 | //! Adds the `pallet-evm` support for the `sgx-runtime. 2 | 3 | // Import types from the crate root including the ones generated by the `construct_runtime!` macro. 4 | use crate::{Balances, Event, Runtime, NORMAL_DISPATCH_RATIO}; 5 | use frame_support::{ 6 | pallet_prelude::Weight, parameter_types, weights::constants::WEIGHT_PER_SECOND, 7 | }; 8 | use sp_core::{H160, U256}; 9 | use sp_runtime::traits::BlakeTwo256; 10 | 11 | pub use pallet_evm::{ 12 | AddressMapping, Call as EvmCall, EnsureAddressTruncated, FeeCalculator, GasWeightMapping, 13 | HashedAddressMapping as GenericHashedAddressMapping, SubstrateBlockHashMapping, 14 | }; 15 | 16 | pub type HashedAddressMapping = GenericHashedAddressMapping; 17 | 18 | /// Maximum weight per block 19 | pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; 20 | 21 | // FIXME: For now just a random value. 22 | pub struct FixedGasPrice; 23 | impl FeeCalculator for FixedGasPrice { 24 | fn min_gas_price() -> (U256, u64) { 25 | (1.into(), 1) 26 | } 27 | } 28 | 29 | /// Current approximation of the gas/s consumption considering 30 | /// EVM execution over compiled WASM (on 4.4Ghz CPU). 31 | /// Given the 500ms Weight, from which 75% only are used for transactions, 32 | /// the total EVM execution gas limit is: GAS_PER_SECOND * 0.500 * 0.75 ~= 15_000_000. 33 | pub const GAS_PER_SECOND: u64 = 40_000_000; 34 | 35 | /// Approximate ratio of the amount of Weight per Gas. 36 | /// u64 works for approximations because Weight is a very small unit compared to gas. 37 | pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND / GAS_PER_SECOND; 38 | 39 | pub struct FixedGasWeightMapping; 40 | 41 | impl GasWeightMapping for FixedGasWeightMapping { 42 | fn gas_to_weight(gas: u64) -> Weight { 43 | gas.saturating_mul(WEIGHT_PER_GAS) 44 | } 45 | fn weight_to_gas(weight: Weight) -> u64 { 46 | u64::try_from(weight.wrapping_div(WEIGHT_PER_GAS)).unwrap_or(u32::MAX as u64) 47 | } 48 | } 49 | 50 | /// An ipmlementation of Frontier's AddressMapping trait for Sgx Accounts. 51 | /// This is basically identical to Frontier's own IdentityAddressMapping, but it works for any type 52 | /// that is Into like AccountId20 for example. 53 | pub struct IntoAddressMapping; 54 | 55 | impl> AddressMapping for IntoAddressMapping { 56 | fn into_account_id(address: H160) -> T { 57 | address.into() 58 | } 59 | } 60 | 61 | parameter_types! { 62 | pub const ChainId: u64 = 42; 63 | pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WEIGHT_PER_GAS); 64 | //pub PrecompilesValue: FrontierPrecompiles = FrontierPrecompiles::<_>::new(); 65 | } 66 | 67 | impl pallet_evm::Config for Runtime { 68 | type FeeCalculator = FixedGasPrice; 69 | type GasWeightMapping = FixedGasWeightMapping; 70 | type BlockHashMapping = SubstrateBlockHashMapping; 71 | type CallOrigin = EnsureAddressTruncated; 72 | type WithdrawOrigin = EnsureAddressTruncated; 73 | type AddressMapping = HashedAddressMapping; 74 | type Currency = Balances; 75 | type Event = Event; 76 | type Runner = pallet_evm::runner::stack::Runner; 77 | type PrecompilesType = (); 78 | type PrecompilesValue = (); 79 | type ChainId = ChainId; 80 | type OnChargeTransaction = (); 81 | type BlockGasLimit = BlockGasLimit; 82 | type FindAuthor = (); // Currently not available. Would need some more thoughts how prioritisation fees could be handled. 83 | } 84 | -------------------------------------------------------------------------------- /runtime/src/lib.rs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021 Integritee AG and Supercomputing Systems AG 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | //! The Substrate Node Template runtime for SGX. 18 | //! This is only meant to be used inside an SGX enclave with `#[no_std]` 19 | //! 20 | //! you should assemble your runtime to be used with your STF here 21 | //! and get all your needed pallets in 22 | 23 | #![cfg_attr(not(feature = "std"), no_std)] 24 | #![feature(prelude_import)] 25 | #![feature(structural_match)] 26 | #![feature(core_intrinsics)] 27 | #![feature(derive_eq)] 28 | // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. 29 | #![recursion_limit = "256"] 30 | 31 | #[cfg(feature = "evm")] 32 | mod evm; 33 | 34 | #[cfg(feature = "evm")] 35 | pub use evm::{ 36 | AddressMapping, EnsureAddressTruncated, EvmCall, FeeCalculator, FixedGasPrice, 37 | FixedGasWeightMapping, GasWeightMapping, HashedAddressMapping, IntoAddressMapping, 38 | SubstrateBlockHashMapping, GAS_PER_SECOND, MAXIMUM_BLOCK_WEIGHT, WEIGHT_PER_GAS, 39 | }; 40 | 41 | use frame_support::weights::ConstantMultiplier; 42 | use pallet_transaction_payment::CurrencyAdapter; 43 | use sp_api::impl_runtime_apis; 44 | use sp_core::OpaqueMetadata; 45 | use sp_runtime::{ 46 | create_runtime_str, generic, 47 | traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, 48 | MultiSignature, 49 | }; 50 | use sp_std::prelude::*; 51 | use sp_version::RuntimeVersion; 52 | 53 | // A few exports that help ease life for downstream crates. 54 | pub use frame_support::{ 55 | construct_runtime, parameter_types, 56 | traits::{KeyOwnerProofSystem, Randomness}, 57 | weights::{ 58 | constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, 59 | IdentityFee, Weight, 60 | }, 61 | StorageValue, 62 | }; 63 | pub use pallet_balances::Call as BalancesCall; 64 | pub use pallet_parentchain::Call as ParentchainCall; 65 | pub use pallet_timestamp::Call as TimestampCall; 66 | #[cfg(any(feature = "std", test))] 67 | pub use sp_runtime::BuildStorage; 68 | pub use sp_runtime::{Perbill, Permill}; 69 | 70 | /// The address format for describing accounts. 71 | pub type Address = sp_runtime::MultiAddress; 72 | /// Block header type as expected by this runtime. 73 | pub type Header = generic::Header; 74 | /// Block type as expected by this runtime. 75 | pub type Block = generic::Block; 76 | /// A Block signed with a Justification 77 | pub type SignedBlock = generic::SignedBlock; 78 | /// BlockId type as expected by this runtime. 79 | pub type BlockId = generic::BlockId; 80 | /// The SignedExtension to the basic transaction logic. 81 | pub type SignedExtra = ( 82 | frame_system::CheckNonZeroSender, 83 | frame_system::CheckSpecVersion, 84 | frame_system::CheckTxVersion, 85 | frame_system::CheckGenesis, 86 | frame_system::CheckEra, 87 | frame_system::CheckNonce, 88 | frame_system::CheckWeight, 89 | pallet_transaction_payment::ChargeTransactionPayment, 90 | ); 91 | /// Unchecked extrinsic type as expected by this runtime. 92 | pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; 93 | /// Extrinsic type that has already been checked. 94 | pub type CheckedExtrinsic = generic::CheckedExtrinsic; 95 | /// Executive: handles dispatch to the various modules. 96 | pub type Executive = frame_executive::Executive< 97 | Runtime, 98 | Block, 99 | frame_system::ChainContext, 100 | Runtime, 101 | AllPalletsReversedWithSystemFirst, 102 | >; 103 | /// An index to a block. 104 | pub type BlockNumber = u32; 105 | 106 | /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. 107 | pub type Signature = MultiSignature; 108 | 109 | /// Some way of identifying an account on the chain. We intentionally make it equivalent 110 | /// to the public key of our transaction signing scheme. 111 | pub type AccountId = <::Signer as IdentifyAccount>::AccountId; 112 | 113 | /// The type for looking up accounts. We don't expect more than 4 billion of them, but you 114 | /// never know... 115 | pub type AccountIndex = u32; 116 | 117 | /// Balance of an account. 118 | pub type Balance = u128; 119 | 120 | /// Index of a transaction in the chain. 121 | pub type Index = u32; 122 | 123 | /// A hash of some data used by the chain. 124 | pub type Hash = sp_core::H256; 125 | 126 | /// Digest item type. 127 | pub type DigestItem = generic::DigestItem; 128 | 129 | /// A type to hold UTC unix epoch [ms] 130 | pub type Moment = u64; 131 | pub const ONE_DAY: Moment = 86_400_000; 132 | 133 | /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know 134 | /// the specifics of the runtime. They can then be made to be agnostic over specific formats 135 | /// of data like extrinsics, allowing for them to continue syncing the network through upgrades 136 | /// to even the core data structures. 137 | pub mod opaque { 138 | use super::*; 139 | 140 | pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; 141 | 142 | /// Opaque block header type. 143 | pub type Header = super::Header; 144 | /// Opaque block type. 145 | pub type Block = super::Block; 146 | /// Opaque block identifier type. 147 | pub type BlockId = generic::BlockId; 148 | } 149 | 150 | pub const VERSION: RuntimeVersion = RuntimeVersion { 151 | spec_name: create_runtime_str!("node-template"), 152 | impl_name: create_runtime_str!("node-template"), 153 | authoring_version: 1, 154 | spec_version: 1, 155 | impl_version: 1, 156 | apis: RUNTIME_API_VERSIONS, 157 | transaction_version: 1, 158 | state_version: 0, 159 | }; 160 | 161 | pub const MILLISECS_PER_BLOCK: u64 = 6000; 162 | 163 | pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; 164 | 165 | // Time is measured by number of blocks. 166 | pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); 167 | pub const HOURS: BlockNumber = MINUTES * 60; 168 | pub const DAYS: BlockNumber = HOURS * 24; 169 | 170 | const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); 171 | 172 | parameter_types! { 173 | pub const Version: RuntimeVersion = VERSION; 174 | pub const BlockHashCount: BlockNumber = 2400; 175 | /// We allow for 2 seconds of compute with a 6 second average block time. 176 | pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights 177 | ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); 178 | pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength 179 | ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); 180 | pub const SS58Prefix: u8 = 42; 181 | } 182 | 183 | // Configure FRAME pallets to include in runtime. 184 | 185 | impl frame_system::Config for Runtime { 186 | /// The basic call filter to use in dispatchable. 187 | type BaseCallFilter = frame_support::traits::Everything; 188 | /// Block & extrinsics weights: base values and limits. 189 | type BlockWeights = BlockWeights; 190 | /// The maximum length of a block (in bytes). 191 | type BlockLength = BlockLength; 192 | /// The identifier used to distinguish between accounts. 193 | type AccountId = AccountId; 194 | /// The aggregated dispatch type that is available for extrinsics. 195 | type Call = Call; 196 | /// The lookup mechanism to get account ID from whatever is passed in dispatchers. 197 | type Lookup = AccountIdLookup; 198 | /// The index type for storing how many extrinsics an account has signed. 199 | type Index = Index; 200 | /// The index type for blocks. 201 | type BlockNumber = BlockNumber; 202 | /// The type for hashing blocks and tries. 203 | type Hash = Hash; 204 | /// The hashing algorithm used. 205 | type Hashing = BlakeTwo256; 206 | /// The header type. 207 | type Header = generic::Header; 208 | /// The ubiquitous event type. 209 | type Event = Event; 210 | /// The ubiquitous origin type. 211 | type Origin = Origin; 212 | /// Maximum number of block number to block hash mappings to keep (oldest pruned first). 213 | type BlockHashCount = BlockHashCount; 214 | /// The weight of database operations that the runtime can invoke. 215 | type DbWeight = RocksDbWeight; 216 | /// Version of the runtime. 217 | type Version = Version; 218 | /// Converts a module to the index of the module in `construct_runtime!`. 219 | /// 220 | /// This type is being generated by `construct_runtime!`. 221 | type PalletInfo = PalletInfo; 222 | /// What to do if a new account is created. 223 | type OnNewAccount = (); 224 | /// What to do if an account is fully reaped from the system. 225 | type OnKilledAccount = (); 226 | /// The data to be stored in an account. 227 | type AccountData = pallet_balances::AccountData; 228 | /// Weight information for the extrinsics of this pallet. 229 | type SystemWeightInfo = (); 230 | /// This is used as an identifier of the chain. 42 is the generic substrate prefix. 231 | type SS58Prefix = SS58Prefix; 232 | /// The set code logic, just the default since we're not a parachain. 233 | type OnSetCode = (); 234 | /// The maximum number of consumers allowed on a single account. 235 | type MaxConsumers = frame_support::traits::ConstU32<16>; 236 | } 237 | 238 | parameter_types! { 239 | pub const MinimumPeriod: u64 = SLOT_DURATION / 2; 240 | } 241 | 242 | impl pallet_timestamp::Config for Runtime { 243 | /// A timestamp: milliseconds since the unix epoch. 244 | type Moment = u64; 245 | type OnTimestampSet = (); 246 | type MinimumPeriod = MinimumPeriod; 247 | type WeightInfo = (); 248 | } 249 | 250 | parameter_types! { 251 | pub const ExistentialDeposit: u128 = 500; 252 | pub const MaxLocks: u32 = 50; 253 | } 254 | 255 | impl pallet_balances::Config for Runtime { 256 | type MaxLocks = MaxLocks; 257 | type MaxReserves = (); 258 | type ReserveIdentifier = [u8; 8]; 259 | /// The type for recording an account's balance. 260 | type Balance = Balance; 261 | /// The ubiquitous event type. 262 | type Event = Event; 263 | type DustRemoval = (); 264 | type ExistentialDeposit = ExistentialDeposit; 265 | type AccountStore = System; 266 | type WeightInfo = (); 267 | } 268 | 269 | parameter_types! { 270 | pub const TransactionByteFee: Balance = 1; 271 | pub const OperationalFeeMultiplier: u8 = 5; 272 | } 273 | 274 | impl pallet_transaction_payment::Config for Runtime { 275 | type Event = Event; 276 | type OnChargeTransaction = CurrencyAdapter; 277 | type OperationalFeeMultiplier = OperationalFeeMultiplier; 278 | type WeightToFee = IdentityFee; 279 | type LengthToFee = ConstantMultiplier; 280 | type FeeMultiplierUpdate = (); 281 | } 282 | 283 | impl pallet_sudo::Config for Runtime { 284 | type Event = Event; 285 | type Call = Call; 286 | } 287 | 288 | impl pallet_parentchain::Config for Runtime { 289 | type WeightInfo = (); 290 | } 291 | 292 | // The plain sgx-runtime without the `evm-pallet` 293 | #[cfg(not(feature = "evm"))] 294 | construct_runtime!( 295 | pub enum Runtime where 296 | Block = Block, 297 | NodeBlock = opaque::Block, 298 | UncheckedExtrinsic = UncheckedExtrinsic 299 | { 300 | System: frame_system::{Pallet, Call, Config, Storage, Event}, 301 | Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, 302 | Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, 303 | TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, 304 | Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, 305 | Parentchain: pallet_parentchain::{Pallet, Call, Storage}, 306 | } 307 | ); 308 | 309 | // Runtime constructed with the evm pallet. 310 | // 311 | // We need add the compiler-flag for the whole macro because it does not support 312 | // compiler flags withing the macro. 313 | #[cfg(feature = "evm")] 314 | construct_runtime!( 315 | pub enum Runtime where 316 | Block = Block, 317 | NodeBlock = opaque::Block, 318 | UncheckedExtrinsic = UncheckedExtrinsic 319 | { 320 | System: frame_system::{Pallet, Call, Config, Storage, Event}, 321 | Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, 322 | Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, 323 | TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, 324 | Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, 325 | Parentchain: pallet_parentchain::{Pallet, Call, Storage}, 326 | 327 | Evm: pallet_evm::{Pallet, Call, Storage, Config, Event}, 328 | } 329 | ); 330 | 331 | impl_runtime_apis! { 332 | impl sp_api::Core for Runtime { 333 | fn version() -> RuntimeVersion { 334 | VERSION 335 | } 336 | 337 | fn execute_block(block: Block) { 338 | Executive::execute_block(block); 339 | } 340 | 341 | fn initialize_block(header: &::Header) { 342 | Executive::initialize_block(header) 343 | } 344 | } 345 | 346 | impl sp_api::Metadata for Runtime { 347 | fn metadata() -> OpaqueMetadata { 348 | OpaqueMetadata::new(Runtime::metadata().into()) 349 | } 350 | } 351 | 352 | } 353 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "nightly-2022-03-10" 3 | targets = ["wasm32-unknown-unknown"] 4 | profile = "default" # include rustfmt, clippy 5 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | # Basic 2 | hard_tabs = true 3 | max_width = 100 4 | use_small_heuristics = "Max" 5 | # Imports 6 | imports_granularity = "Crate" 7 | reorder_imports = true 8 | # Consistency 9 | newline_style = "Unix" 10 | # Misc 11 | chain_width = 80 12 | spaces_around_ranges = false 13 | binop_separator = "Back" 14 | reorder_impl_items = false 15 | match_arm_leading_pipes = "Preserve" 16 | match_arm_blocks = false 17 | match_block_trailing_comma = true 18 | trailing_comma = "Vertical" 19 | trailing_semicolon = false 20 | use_field_init_shorthand = true -------------------------------------------------------------------------------- /scripts/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | echo "*** Initializing WASM build environment" 6 | 7 | if [ -z $CI_PROJECT_NAME ] ; then 8 | rustup update nightly 9 | rustup update stable 10 | fi 11 | 12 | rustup target add wasm32-unknown-unknown --toolchain nightly 13 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | mozillaOverlay = 3 | import (builtins.fetchGit { 4 | url = "https://github.com/mozilla/nixpkgs-mozilla.git"; 5 | rev = "57c8084c7ef41366993909c20491e359bbb90f54"; 6 | }); 7 | nixpkgs = import { overlays = [ mozillaOverlay ]; }; 8 | rust-nightly = with nixpkgs; ((rustChannelOf { date = "2020-10-05"; channel = "nightly"; }).rust.override { 9 | targets = [ "wasm32-unknown-unknown" ]; 10 | }); 11 | in 12 | with nixpkgs; pkgs.mkShell { 13 | buildInputs = [ 14 | clang 15 | cmake 16 | pkg-config 17 | rust-nightly 18 | ] ++ stdenv.lib.optionals stdenv.isDarwin [ 19 | darwin.apple_sdk.frameworks.Security 20 | ]; 21 | 22 | LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; 23 | PROTOC = "${protobuf}/bin/protoc"; 24 | ROCKSDB_LIB_DIR = "${rocksdb}/lib"; 25 | } 26 | -------------------------------------------------------------------------------- /substrate-sgx/externalities/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sgx-externalities" 3 | version = "0.4.0" 4 | authors = ["Integritee AG and Parity Technologies "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | # no_std 9 | codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive", "chain-error"]} 10 | derive_more = "0.99.16" 11 | environmental = { version = "1.1.3", default-features = false } 12 | log = { version = "0.4", default-features = false } 13 | serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] } 14 | postcard = { version = "0.7.2", default-features = false, features = ["alloc"] } 15 | 16 | # sgx dependencies 17 | sgx_tstd = { optional = true, features = ["untrusted_fs","net","backtrace"], git = "https://github.com/apache/teaclave-sgx-sdk.git", branch = "master" } 18 | sgx_types = { git = "https://github.com/apache/teaclave-sgx-sdk.git", branch = "master" } 19 | 20 | [features] 21 | default = ["std"] 22 | std = [ 23 | "codec/std", 24 | "environmental/std", 25 | "log/std", 26 | "postcard/use-std", 27 | "serde/std", 28 | ] 29 | sgx = [ 30 | "sgx_tstd", 31 | ] 32 | -------------------------------------------------------------------------------- /substrate-sgx/externalities/src/bypass.rs: -------------------------------------------------------------------------------- 1 | //! Converts maps to vecs for serialization. 2 | //! from https://github.com/DenisKolodin/vectorize 3 | //! 4 | //! `bypass` is necessary to force deriving serialization of complex type specs. 5 | 6 | use serde::{Deserialize, Deserializer, Serialize, Serializer}; 7 | 8 | #[allow(unused)] 9 | pub fn serialize<'a, T, S>(target: T, ser: S) -> Result 10 | where 11 | S: Serializer, 12 | T: Serialize + 'a, 13 | { 14 | serde::Serialize::serialize(&target, ser) 15 | } 16 | 17 | #[allow(unused)] 18 | pub fn deserialize<'de, T, D>(des: D) -> Result 19 | where 20 | D: Deserializer<'de>, 21 | T: Deserialize<'de>, 22 | { 23 | serde::Deserialize::deserialize(des) 24 | } 25 | 26 | #[cfg(test)] 27 | mod tests { 28 | use serde::{de::DeserializeOwned, Deserialize, Serialize}; 29 | use std::fmt; 30 | 31 | trait Requirement: 32 | DeserializeOwned + Serialize + Clone + fmt::Debug + Sync + Send + 'static 33 | { 34 | } 35 | 36 | trait ComplexSpec: Requirement {} 37 | 38 | #[derive(Debug, Serialize, Deserialize)] 39 | struct MyComplexType { 40 | #[serde(with = "super")] // = "vectorize::bypass" 41 | inner: Option, 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /substrate-sgx/externalities/src/codec_impl.rs: -------------------------------------------------------------------------------- 1 | //! Implement `parity-scale-codec` for the externalities. 2 | //! 3 | //! This is necessary workaround, as `Encode` and `Decode` can't directly be implemented on `HashMap` or `BTreeMap`. 4 | 5 | use codec::{Decode, Encode, Input}; 6 | use serde::{de::DeserializeOwned, Serialize}; 7 | use std::{vec, vec::Vec}; 8 | 9 | use crate::{SgxExternalitiesDiffType, SgxExternalitiesType}; 10 | 11 | impl Encode for SgxExternalitiesType { 12 | fn encode(&self) -> Vec { 13 | encode_with_serialize(&self) 14 | } 15 | } 16 | 17 | impl Decode for SgxExternalitiesType { 18 | fn decode(input: &mut I) -> Result { 19 | decode_with_deserialize(input) 20 | } 21 | } 22 | 23 | impl Encode for SgxExternalitiesDiffType { 24 | fn encode(&self) -> Vec { 25 | encode_with_serialize(&self) 26 | } 27 | } 28 | 29 | impl Decode for SgxExternalitiesDiffType { 30 | fn decode(input: &mut I) -> Result { 31 | decode_with_deserialize(input) 32 | } 33 | } 34 | 35 | fn encode_with_serialize(source: &T) -> Vec { 36 | // We unwrap on purpose here in order to make sure we notice when something goes wrong. 37 | // Before we returned an empty vec and logged the error. But this could go unnoticed in the 38 | // caller and cause problems (in case the empty vec is also something valid) 39 | postcard::to_allocvec(source).unwrap() 40 | } 41 | 42 | fn decode_with_deserialize( 43 | input: &mut I, 44 | ) -> Result { 45 | let input_length = input 46 | .remaining_len()? 47 | .ok_or_else(|| codec::Error::from("Could not read length from input data"))?; 48 | 49 | let mut buff = vec![0u8; input_length]; 50 | 51 | input.read(&mut buff)?; 52 | 53 | postcard::from_bytes::<'_, T>(buff.as_slice()).map_err(|e| { 54 | log::error!("deserialization failed: {:?}", e); 55 | codec::Error::from("Could not decode with deserialize") 56 | }) 57 | } 58 | 59 | #[cfg(test)] 60 | mod tests { 61 | use super::*; 62 | use crate::{InternalMap, SgxExternalities}; 63 | use std::{ 64 | collections::hash_map::DefaultHasher, 65 | hash::{Hash, Hasher}, 66 | }; 67 | 68 | #[test] 69 | fn serializing_externalities_type_works() { 70 | ensure_serialize_roundtrip_succeeds(create_default_state()); 71 | } 72 | 73 | #[test] 74 | fn serializing_externalities_diff_type_works() { 75 | ensure_serialize_roundtrip_succeeds(create_default_state_diff()); 76 | } 77 | 78 | #[test] 79 | fn serializing_externalities_works() { 80 | let externalities = SgxExternalities { 81 | state: create_default_state(), 82 | state_diff: create_default_state_diff(), 83 | }; 84 | 85 | ensure_serialize_roundtrip_succeeds(externalities); 86 | } 87 | 88 | #[test] 89 | fn encoding_decoding_preserves_order() { 90 | let externalities = create_default_state(); 91 | let encoded_externalities = externalities.encode(); 92 | let decoded_externalities: SgxExternalitiesType = 93 | Decode::decode(&mut encoded_externalities.as_slice()).unwrap(); 94 | let encoded_second_time_externalities = decoded_externalities.encode(); 95 | 96 | assert_eq!( 97 | calculate_hash(&encoded_externalities), 98 | calculate_hash(&encoded_second_time_externalities) 99 | ); 100 | } 101 | 102 | fn create_default_state_diff() -> SgxExternalitiesDiffType { 103 | let mut map = InternalMap::>>::new(); 104 | map.insert(Encode::encode("dings"), Some(Encode::encode("other"))); 105 | map.insert(Encode::encode("item"), Some(Encode::encode("crate"))); 106 | map.insert(Encode::encode("key"), None); 107 | SgxExternalitiesDiffType(map) 108 | } 109 | 110 | fn create_default_state() -> SgxExternalitiesType { 111 | let mut map = InternalMap::>::new(); 112 | map.insert(Encode::encode("dings"), Encode::encode("other")); 113 | map.insert(Encode::encode("item"), Encode::encode("crate")); 114 | SgxExternalitiesType(map) 115 | } 116 | 117 | fn ensure_serialize_roundtrip_succeeds< 118 | T: Serialize + DeserializeOwned + std::cmp::PartialEq + std::fmt::Debug, 119 | >( 120 | item: T, 121 | ) { 122 | let serialized_item = postcard::to_allocvec(&item).unwrap(); 123 | let deserialized_item = postcard::from_bytes::<'_, T>(serialized_item.as_slice()).unwrap(); 124 | assert_eq!(item, deserialized_item); 125 | } 126 | 127 | fn calculate_hash(t: &T) -> u64 { 128 | let mut s = DefaultHasher::new(); 129 | t.hash(&mut s); 130 | s.finish() 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /substrate-sgx/externalities/src/lib.rs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021 Integritee AG and Supercomputing Systems AG 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #![cfg_attr(not(feature = "std"), no_std)] 17 | 18 | #[cfg(all(feature = "std", feature = "sgx"))] 19 | compile_error!("feature \"std\" and feature \"sgx\" cannot be enabled at the same time"); 20 | 21 | #[cfg(feature = "sgx")] 22 | extern crate sgx_tstd as std; 23 | 24 | use codec::{Decode, Encode}; 25 | use derive_more::{Deref, DerefMut, From}; 26 | use environmental::environmental; 27 | use serde::{Deserialize, Serialize}; 28 | use std::{collections::BTreeMap, vec::Vec}; 29 | 30 | // Unfortunately we cannot use `serde_with::serde_as` to serialize our map (which would be very convenient) 31 | // because it has pulls in the serde and serde_json dependency with `std`, not `default-features=no`. 32 | // Instead we use https://github.com/DenisKolodin/vectorize which is very little code, copy-pasted 33 | // directly into this code base. 34 | //use serde_with::serde_as; 35 | 36 | mod codec_impl; 37 | // These are used to serialize a map with keys that are not string. 38 | mod bypass; 39 | mod vectorize; 40 | 41 | type InternalMap = BTreeMap, V>; 42 | 43 | #[derive(From, Deref, DerefMut, Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] 44 | pub struct SgxExternalitiesType(#[serde(with = "vectorize")] InternalMap>); 45 | 46 | #[derive(From, Deref, DerefMut, Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] 47 | pub struct SgxExternalitiesDiffType(#[serde(with = "vectorize")] InternalMap>>); 48 | 49 | #[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode, Serialize, Deserialize)] 50 | pub struct SgxExternalities { 51 | pub state: SgxExternalitiesType, 52 | pub state_diff: SgxExternalitiesDiffType, 53 | } 54 | 55 | environmental!(ext: SgxExternalities); 56 | 57 | pub trait SgxExternalitiesTrait { 58 | fn new() -> Self; 59 | fn state(&self) -> &SgxExternalitiesType; 60 | fn state_diff(&self) -> &SgxExternalitiesDiffType; 61 | fn insert(&mut self, k: Vec, v: Vec) -> Option>; 62 | fn remove(&mut self, k: &[u8]) -> Option>; 63 | fn get(&self, k: &[u8]) -> Option<&Vec>; 64 | fn contains_key(&self, k: &[u8]) -> bool; 65 | fn prune_state_diff(&mut self); 66 | fn execute_with(&mut self, f: impl FnOnce() -> R) -> R; 67 | } 68 | 69 | impl SgxExternalitiesTrait for SgxExternalities { 70 | /// Create a new instance of `BasicExternalities` 71 | fn new() -> Self { 72 | Default::default() 73 | } 74 | 75 | fn state(&self) -> &SgxExternalitiesType { 76 | &self.state 77 | } 78 | 79 | fn state_diff(&self) -> &SgxExternalitiesDiffType { 80 | &self.state_diff 81 | } 82 | 83 | /// Insert key/value 84 | fn insert(&mut self, k: Vec, v: Vec) -> Option> { 85 | self.state_diff.insert(k.clone(), Some(v.clone())); 86 | self.state.insert(k, v) 87 | } 88 | 89 | /// remove key 90 | fn remove(&mut self, k: &[u8]) -> Option> { 91 | self.state_diff.insert(k.to_vec(), None); 92 | self.state.remove(k) 93 | } 94 | 95 | /// get value from state of key 96 | fn get(&self, k: &[u8]) -> Option<&Vec> { 97 | self.state.get(k) 98 | } 99 | 100 | /// check if state contains key 101 | fn contains_key(&self, k: &[u8]) -> bool { 102 | self.state.contains_key(k) 103 | } 104 | 105 | /// prunes the state diff 106 | fn prune_state_diff(&mut self) { 107 | self.state_diff.clear(); 108 | } 109 | 110 | /// Execute the given closure while `self` is set as externalities. 111 | /// 112 | /// Returns the result of the given closure. 113 | fn execute_with(&mut self, f: impl FnOnce() -> R) -> R { 114 | set_and_run_with_externalities(self, f) 115 | } 116 | } 117 | 118 | /// Set the given externalities while executing the given closure. To get access to the externalities 119 | /// while executing the given closure [`with_externalities`] grants access to them. The externalities 120 | /// are only set for the same thread this function was called from. 121 | pub fn set_and_run_with_externalities R, R>(ext: &mut SgxExternalities, f: F) -> R { 122 | ext::using(ext, f) 123 | } 124 | 125 | /// Execute the given closure with the currently set externalities. 126 | /// 127 | /// Returns `None` if no externalities are set or `Some(_)` with the result of the closure. 128 | pub fn with_externalities R, R>(f: F) -> Option { 129 | ext::with(f) 130 | } 131 | 132 | /// Results concerning an operation to remove many keys. 133 | #[derive(codec::Encode, codec::Decode)] 134 | #[must_use] 135 | pub struct MultiRemovalResults { 136 | /// A continuation cursor which, if `Some` must be provided to the subsequent removal call. 137 | /// If `None` then all removals are complete and no further calls are needed. 138 | pub maybe_cursor: Option>, 139 | /// The number of items removed from the backend database. 140 | pub backend: u32, 141 | /// The number of unique keys removed, taking into account both the backend and the overlay. 142 | pub unique: u32, 143 | /// The number of iterations (each requiring a storage seek/read) which were done. 144 | pub loops: u32, 145 | } 146 | 147 | impl MultiRemovalResults { 148 | /// Deconstruct into the internal components. 149 | /// 150 | /// Returns `(maybe_cursor, backend, unique, loops)`. 151 | pub fn deconstruct(self) -> (Option>, u32, u32, u32) { 152 | (self.maybe_cursor, self.backend, self.unique, self.loops) 153 | } 154 | } 155 | 156 | #[cfg(test)] 157 | pub mod tests { 158 | 159 | use super::*; 160 | 161 | #[test] 162 | fn mutating_externalities_through_environmental_variable_works() { 163 | let mut externalities = SgxExternalities::default(); 164 | 165 | externalities.execute_with(|| { 166 | with_externalities(|e| { 167 | e.insert("building".encode(), "empire_state".encode()); 168 | e.insert("house".encode(), "ginger_bread".encode()); 169 | }) 170 | .unwrap() 171 | }); 172 | 173 | let state_len = 174 | externalities.execute_with(|| with_externalities(|e| e.state.0.len()).unwrap()); 175 | 176 | assert_eq!(2, state_len); 177 | } 178 | 179 | #[test] 180 | fn basic_externalities_is_empty() { 181 | let ext = SgxExternalities::default(); 182 | assert!(ext.state.0.is_empty()); 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /substrate-sgx/externalities/src/vectorize.rs: -------------------------------------------------------------------------------- 1 | //! Converts maps to vecs for serialization. 2 | //! from https://github.com/DenisKolodin/vectorize 3 | 4 | use serde::{Deserialize, Deserializer, Serialize, Serializer}; 5 | use std::{iter::FromIterator, vec::Vec}; 6 | 7 | pub fn serialize<'a, T, K, V, S>(target: T, ser: S) -> Result 8 | where 9 | S: Serializer, 10 | T: IntoIterator, 11 | K: Serialize + 'a, 12 | V: Serialize + 'a, 13 | { 14 | let container: Vec<_> = target.into_iter().collect(); 15 | serde::Serialize::serialize(&container, ser) 16 | } 17 | 18 | pub fn deserialize<'de, T, K, V, D>(des: D) -> Result 19 | where 20 | D: Deserializer<'de>, 21 | T: FromIterator<(K, V)>, 22 | K: Deserialize<'de>, 23 | V: Deserialize<'de>, 24 | { 25 | let container: Vec<_> = serde::Deserialize::deserialize(des)?; 26 | Ok(container.into_iter().collect()) 27 | } 28 | 29 | #[cfg(test)] 30 | mod tests { 31 | use crate::vectorize; 32 | use serde::{Deserialize, Serialize}; 33 | use std::collections::HashMap; 34 | 35 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] 36 | struct MyKey { 37 | one: String, 38 | two: u16, 39 | more: Vec, 40 | } 41 | 42 | #[derive(Debug, Serialize, Deserialize)] 43 | struct MyComplexType { 44 | #[serde(with = "vectorize")] 45 | map: HashMap, 46 | } 47 | 48 | #[test] 49 | fn it_works() -> Result<(), Box> { 50 | let key = MyKey { one: "1".into(), two: 2, more: vec![1, 2, 3] }; 51 | let mut map = HashMap::new(); 52 | map.insert(key.clone(), "value".into()); 53 | let instance = MyComplexType { map }; 54 | let serialized = postcard::to_allocvec(&instance)?; 55 | let deserialized: MyComplexType = postcard::from_bytes(&serialized)?; 56 | let expected_value = "value".to_string(); 57 | assert_eq!(deserialized.map.get(&key), Some(&expected_value)); 58 | Ok(()) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /substrate-sgx/sp-io/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sp-io" 3 | version = "6.0.0" 4 | authors = ["Integritee AG and Parity Technologies "] 5 | edition = "2018" 6 | license = "Apache-2.0" 7 | 8 | [dependencies] 9 | codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } 10 | hash-db = { version = "0.15.2", default-features = false } 11 | libsecp256k1 = { version = "0.7.0", default-features = false, features = ["static-context"] } 12 | futures = { version = "0.3.1", optional = true, features = ["thread-pool"] } 13 | parking_lot = { version = "0.12.0", optional = true } 14 | tracing = { version = "0.1.25", default-features = false } 15 | tracing-core = { version = "0.1.17", default-features = false} 16 | log = { version = "0.4", default-features = false } 17 | 18 | environmental = { version = "1.1.3", default-features = false } 19 | sgx_tstd = { optional = true, features = ["untrusted_fs","net","backtrace"], git = "https://github.com/apache/teaclave-sgx-sdk.git", branch = "master" } 20 | sgx_types = { optional = true, git = "https://github.com/apache/teaclave-sgx-sdk.git", branch = "master" } 21 | sgx-externalities = { optional = true, default-features = false, path = "../externalities" } 22 | 23 | # Substrate dependencies 24 | sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 25 | sp-core = { default-features = false, features=["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 26 | sp-state-machine = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 27 | sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 28 | sp-wasm-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 29 | sp-tracing = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 30 | sp-trie = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 31 | sp-keystore = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 32 | sp-externalities = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 33 | 34 | [dev-dependencies] 35 | hex-literal = { version = "0.3.4" } 36 | 37 | [features] 38 | default = ["std"] 39 | std = [ 40 | "environmental/std", 41 | "log/std", 42 | "sp-core/std", 43 | "codec/std", 44 | "sp-std/std", 45 | "sp-keystore/std", 46 | "hash-db/std", 47 | "sp-trie", 48 | "sp-state-machine", 49 | "libsecp256k1/std", 50 | "sp-runtime-interface/std", 51 | "sp-externalities/std", 52 | "sp-wasm-interface/std", 53 | "futures", 54 | "parking_lot", 55 | "sgx-externalities/std", 56 | ] 57 | sgx = [ 58 | "sgx_tstd", 59 | "sgx_types", 60 | "sgx-externalities/sgx", 61 | "sp-runtime-interface/disable_target_static_assertions", 62 | ] 63 | 64 | # These two features are used for `no_std` builds for the environments which already provides 65 | # `#[panic_handler]`, `#[alloc_error_handler]` and `#[global_allocator]`. 66 | # 67 | # For the regular wasm runtime builds those are not used. 68 | disable_panic_handler = [] 69 | disable_oom = [] 70 | disable_allocator = [] 71 | -------------------------------------------------------------------------------- /substrate-sgx/sp-io/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2019 Parity Technologies (UK) Ltd. 2 | // This file is part of Substrate. 3 | 4 | // Substrate is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | 9 | // Substrate is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | 14 | // You should have received a copy of the GNU General Public License 15 | // along with Substrate. If not, see . 16 | 17 | //#![warn(missing_docs)] 18 | 19 | // Added by Integritee. Prevents warnings during compilation with sgx features at all those 20 | // unimplemented method stubs. 21 | #![allow(unused_variables)] 22 | #![cfg_attr(not(feature = "std"), no_std)] 23 | #![cfg_attr(not(feature = "std"), feature(lang_items))] 24 | #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] 25 | #![cfg_attr(not(feature = "std"), feature(core_intrinsics))] 26 | #![cfg_attr( 27 | feature = "std", 28 | doc = "Substrate runtime standard library as compiled when linked with Rust's standard library." 29 | )] 30 | #![cfg_attr( 31 | not(feature = "std"), 32 | doc = "Substrate's runtime standard library as compiled without Rust's standard library." 33 | )] 34 | 35 | #[cfg(all(feature = "std", feature = "sgx"))] 36 | compile_error!("feature \"std\" and feature \"sgx\" cannot be enabled at the same time"); 37 | 38 | #[cfg(feature = "sgx")] 39 | extern crate sgx_tstd as std; 40 | 41 | use codec::{Decode, Encode}; 42 | use log::*; 43 | use sp_core::{ 44 | crypto::{KeyTypeId, Pair}, 45 | ecdsa, ed25519, 46 | hash::H256, 47 | offchain::{ 48 | HttpError, HttpRequestId, HttpRequestStatus, OpaqueNetworkState, StorageKind, Timestamp, 49 | }, 50 | sr25519, 51 | storage::StateVersion, 52 | }; 53 | use std::{char, prelude::v1::String, println, vec, vec::Vec}; 54 | 55 | #[allow(unused)] 56 | fn encode_hex_digit(digit: u8) -> char { 57 | match char::from_digit(u32::from(digit), 16) { 58 | Some(c) => c, 59 | _ => panic!(), 60 | } 61 | } 62 | 63 | #[allow(unused)] 64 | fn encode_hex_byte(byte: u8) -> [char; 2] { 65 | [encode_hex_digit(byte >> 4), encode_hex_digit(byte & 0x0Fu8)] 66 | } 67 | 68 | #[allow(unused)] 69 | pub fn encode_hex(bytes: &[u8]) -> String { 70 | let strs: Vec = bytes 71 | .iter() 72 | .map(|byte| encode_hex_byte(*byte).iter().copied().collect()) 73 | .collect(); 74 | strs.join("") 75 | } 76 | 77 | // Reexport here, such that the worker does not need to import other crate. 78 | // Not sure if this is a good Idea though. 79 | pub use sgx_externalities::{ 80 | with_externalities, SgxExternalities, SgxExternalitiesTrait, SgxExternalitiesType, 81 | }; 82 | 83 | pub use sp_externalities::MultiRemovalResults; 84 | 85 | /// Error verifying ECDSA signature 86 | #[derive(Encode, Decode)] 87 | pub enum EcdsaVerifyError { 88 | /// Incorrect value of R or S 89 | BadRS, 90 | /// Incorrect value of V 91 | BadV, 92 | /// Invalid signature 93 | BadSignature, 94 | } 95 | 96 | /// The outcome of calling `storage_kill`. Returned value is the number of storage items 97 | /// removed from the trie from making the `storage_kill` call. 98 | #[derive(Encode, Decode)] 99 | pub enum KillStorageResult { 100 | /// No key remains in the child trie. 101 | AllRemoved(u32), 102 | /// At least one key still resides in the child trie due to the supplied limit. 103 | SomeRemaining(u32), 104 | } 105 | 106 | impl From for KillStorageResult { 107 | fn from(r: MultiRemovalResults) -> Self { 108 | match r { 109 | MultiRemovalResults { maybe_cursor: None, backend, .. } => Self::AllRemoved(backend), 110 | MultiRemovalResults { maybe_cursor: Some(..), backend, .. } => 111 | Self::SomeRemaining(backend), 112 | } 113 | } 114 | } 115 | 116 | pub mod storage { 117 | use super::*; 118 | 119 | pub fn get(key: &[u8]) -> Option> { 120 | debug!("storage('{}')", encode_hex(key)); 121 | with_externalities(|ext| { 122 | ext.get(key).map(|s| { 123 | debug!(" returning {}", encode_hex(s)); 124 | s.to_vec() 125 | }) 126 | }) 127 | .expect("storage cannot be called outside of an Externalities-provided environment.") 128 | } 129 | 130 | pub fn read(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { 131 | debug!( 132 | "read_storage('{}' with offset = {:?}. value_out.len() is {})", 133 | encode_hex(key), 134 | value_offset, 135 | value_out.len() 136 | ); 137 | with_externalities(|ext| { 138 | ext.get(key).map(|value| { 139 | debug!(" entire stored value: {:?}", value); 140 | let value = &value[value_offset..]; 141 | debug!(" stored value at offset: {:?}", value); 142 | let written = std::cmp::min(value.len(), value_out.len()); 143 | value_out[..written].copy_from_slice(&value[..written]); 144 | debug!(" write back {:?}, return len {}", value_out, value.len()); 145 | value.len() 146 | }) 147 | }) 148 | .expect("read_storage cannot be called outside of an Externalities-provided environment.") 149 | } 150 | 151 | pub fn set(key: &[u8], value: &[u8]) { 152 | debug!("set_storage('{}', {:x?})", encode_hex(key), value); 153 | with_externalities(|ext| ext.insert(key.to_vec(), value.to_vec())); 154 | } 155 | 156 | pub fn clear(key: &[u8]) { 157 | with_externalities(|ext| { 158 | if let None = ext.remove(key) { 159 | info!("Tried to clear storage that was not existing"); 160 | } 161 | }); 162 | } 163 | 164 | pub fn exists(key: &[u8]) -> bool { 165 | with_externalities(|ext| ext.contains_key(key)) 166 | .expect("exists cannot be called outside of an Externalities-provided environment.") 167 | } 168 | 169 | /// Clear the storage of each key-value pair where the key starts with the given `prefix`. 170 | fn clear_prefix_version_1(prefix: &[u8]) { 171 | warn!("storage::clear_prefix() unimplemented"); 172 | } 173 | 174 | /// Clear the storage of each key-value pair where the key starts with the given `prefix`. 175 | /// 176 | /// # Limit 177 | /// 178 | /// Deletes all keys from the overlay and up to `limit` keys from the backend if 179 | /// it is set to `Some`. No limit is applied when `limit` is set to `None`. 180 | /// 181 | /// The limit can be used to partially delete a prefix storage in case it is too large 182 | /// to delete in one go (block). 183 | /// 184 | /// It returns a boolean false iff some keys are remaining in 185 | /// the prefix after the functions returns. Also returns a `u32` with 186 | /// the number of keys removed from the process. 187 | /// 188 | /// # Note 189 | /// 190 | /// Please note that keys that are residing in the overlay for that prefix when 191 | /// issuing this call are all deleted without counting towards the `limit`. Only keys 192 | /// written during the current block are part of the overlay. Deleting with a `limit` 193 | /// mostly makes sense with an empty overlay for that prefix. 194 | /// 195 | /// Calling this function multiple times per block for the same `prefix` does 196 | /// not make much sense because it is not cumulative when called inside the same block. 197 | /// Use this function to distribute the deletion of a single child trie across multiple 198 | /// blocks. 199 | pub fn clear_prefix(prefix: &[u8], limit: Option) -> KillStorageResult { 200 | warn!("storage::clear_prefix() unimplemented"); 201 | KillStorageResult::AllRemoved(0) 202 | } 203 | 204 | /// Append the encoded `value` to the storage item at `key`. 205 | /// 206 | /// The storage item needs to implement [`EncodeAppend`](codec::EncodeAppend). 207 | /// 208 | /// # Warning 209 | /// 210 | /// If the storage item does not support [`EncodeAppend`](codec::EncodeAppend) or 211 | /// something else fails at appending, the storage item will be set to `[value]`. 212 | pub fn append(key: &[u8], value: Vec) { 213 | warn!("storage::append() unimplemented"); 214 | } 215 | 216 | /// "Commit" all existing operations and compute the resulting storage root. 217 | /// 218 | /// The hashing algorithm is defined by the `Block`. 219 | /// 220 | /// Returns a `Vec` that holds the SCALE encoded hash. 221 | pub fn root_version_1() -> [u8; 32] { 222 | warn!("storage::root() unimplemented"); 223 | [0u8; 32] 224 | } 225 | 226 | /// "Commit" all existing operations and compute the resulting storage root. 227 | /// 228 | /// The hashing algorithm is defined by the `Block`. 229 | /// 230 | /// Returns a `Vec` that holds the SCALE encoded hash. 231 | pub fn root(version: StateVersion) -> [u8; 32] { 232 | warn!("storage::root() unimplemented"); 233 | [0u8; 32] 234 | } 235 | 236 | pub fn changes_root(parent_hash: &[u8]) -> Option<[u8; 32]> { 237 | warn!("storage::changes_root() unimplemented"); 238 | Some([0u8; 32]) 239 | } 240 | 241 | /// Get the next key in storage after the given one in lexicographic order. 242 | pub fn next_key(key: &[u8]) -> Option> { 243 | warn!("storage::next_key unimplemented"); 244 | Some([0u8; 32].to_vec()) 245 | } 246 | 247 | /// Start a new nested transaction. 248 | /// 249 | /// This allows to either commit or roll back all changes that are made after this call. 250 | /// For every transaction there must be a matching call to either `rollback_transaction` 251 | /// or `commit_transaction`. This is also effective for all values manipulated using the 252 | /// `DefaultChildStorage` API. 253 | /// 254 | /// # Warning 255 | /// 256 | /// This is a low level API that is potentially dangerous as it can easily result 257 | /// in unbalanced transactions. For example, FRAME users should use high level storage 258 | /// abstractions. 259 | pub fn start_transaction() { 260 | warn!("storage::start_transaction unimplemented"); 261 | } 262 | 263 | /// Rollback the last transaction started by `start_transaction`. 264 | /// 265 | /// Any changes made during that transaction are discarded. 266 | /// 267 | /// # Panics 268 | /// 269 | /// Will panic if there is no open transaction. 270 | pub fn rollback_transaction() { 271 | warn!("storage::rollback_transaction unimplemented"); 272 | } 273 | 274 | /// Commit the last transaction started by `start_transaction`. 275 | /// 276 | /// Any changes made during that transaction are committed. 277 | /// 278 | /// # Panics 279 | /// 280 | /// Will panic if there is no open transaction. 281 | pub fn commit_transaction() { 282 | warn!("storage::commit_transaction unimplemented"); 283 | } 284 | } 285 | 286 | pub mod default_child_storage { 287 | use super::*; 288 | 289 | pub fn read( 290 | storage_key: &[u8], 291 | key: &[u8], 292 | value_out: &mut [u8], 293 | value_offset: u32, 294 | ) -> Option { 295 | // TODO unimplemented 296 | warn!("default_child_storage::read() unimplemented"); 297 | Some(0) 298 | } 299 | 300 | pub fn get(storage_key: &[u8], key: &[u8]) -> Option> { 301 | // TODO: unimplemented 302 | warn!("default_child_storage::get() unimplemented"); 303 | Some(vec![0, 1, 2, 3]) 304 | } 305 | 306 | pub fn set(storage_key: &[u8], key: &[u8], value: &[u8]) { 307 | warn!("default_child_storage::set() unimplemented"); 308 | } 309 | 310 | pub fn clear(storage_key: &[u8], key: &[u8]) { 311 | warn!("child storage::clear() unimplemented"); 312 | } 313 | 314 | pub fn storage_kill_version_1(storage_key: &[u8]) { 315 | warn!("child storage::storage_kill() unimplemented"); 316 | } 317 | 318 | pub fn storage_kill_version_2(storage_key: &[u8], limit: Option) -> bool { 319 | warn!("child storage::storage_kill() unimplemented"); 320 | false 321 | } 322 | 323 | /// Clear a child storage key. 324 | /// 325 | /// See `Storage` module `clear_prefix` documentation for `limit` usage. 326 | pub fn storage_kill(storage_key: &[u8], limit: Option) -> KillStorageResult { 327 | warn!("child storage::storage_kill() unimplemented"); 328 | KillStorageResult::AllRemoved(0) 329 | } 330 | 331 | pub fn exists(storage_key: &[u8], key: &[u8]) -> bool { 332 | warn!("child storage::exists() unimplemented"); 333 | false 334 | } 335 | 336 | /// Clear child default key by prefix. 337 | /// 338 | /// Clear the child storage of each key-value pair where the key starts with the given `prefix`. 339 | pub fn clear_prefix_version_1(storage_key: &[u8], prefix: &[u8]) { 340 | warn!("child storage::clear_prefix() unimplemented"); 341 | } 342 | 343 | /// Clear the child storage of each key-value pair where the key starts with the given `prefix`. 344 | /// 345 | /// See `Storage` module `clear_prefix` documentation for `limit` usage. 346 | pub fn clear_prefix( 347 | storage_key: &[u8], 348 | prefix: &[u8], 349 | limit: Option, 350 | ) -> KillStorageResult { 351 | warn!("child storage::clear_prefix() unimplemented"); 352 | KillStorageResult::AllRemoved(0) 353 | } 354 | 355 | pub fn root_version_1(storage_key: &[u8]) -> Vec { 356 | warn!("child storage::root() unimplemented"); 357 | vec![0, 1, 2, 3] 358 | } 359 | 360 | pub fn root(storage_key: &[u8], version: StateVersion) -> Vec { 361 | warn!("child storage::root() unimplemented"); 362 | vec![0, 1, 2, 3] 363 | } 364 | 365 | pub fn next_key(storage_key: &[u8], key: &[u8]) -> Option> { 366 | warn!("child storage::next_key() unimplemented"); 367 | Some(Vec::new()) 368 | } 369 | } 370 | 371 | pub mod trie { 372 | use super::*; 373 | 374 | /// A trie root formed from the iterated items. 375 | pub fn blake2_256_root_version_1(input: Vec<(Vec, Vec)>) -> H256 { 376 | warn!("trie::blake2_256_root() unimplemented"); 377 | H256::default() 378 | } 379 | 380 | /// A trie root formed from the iterated items. 381 | pub fn blake2_256_root(input: Vec<(Vec, Vec)>, version: StateVersion) -> H256 { 382 | warn!("trie::blake2_256_root() unimplemented"); 383 | H256::default() 384 | } 385 | 386 | /// A trie root formed from the enumerated items. 387 | pub fn blake2_256_ordered_root_version_1(input: Vec>) -> H256 { 388 | warn!("trie::blake2_256_ordered_root() unimplemented"); 389 | H256::default() 390 | } 391 | 392 | /// A trie root formed from the enumerated items. 393 | pub fn blake2_256_ordered_root(input: Vec>, version: StateVersion) -> H256 { 394 | warn!("trie::blake2_256_ordered_root() unimplemented"); 395 | H256::default() 396 | } 397 | 398 | pub fn keccak_256_root_version_1(input: Vec<(Vec, Vec)>) -> H256 { 399 | warn!("trie::keccak_256_root_version_1() unimplemented"); 400 | H256::default() 401 | } 402 | 403 | pub fn keccak_256_root(input: Vec<(Vec, Vec)>, version: StateVersion) -> H256 { 404 | warn!("trie::keccak_256_root() unimplemented"); 405 | H256::default() 406 | } 407 | 408 | /// A trie root formed from the enumerated items. 409 | pub fn keccak_256_ordered_root_version_1(input: Vec>) -> H256 { 410 | warn!("trie::keccak_256_ordered_root() unimplemented"); 411 | H256::default() 412 | } 413 | 414 | /// A trie root formed from the enumerated items. 415 | pub fn keccak_256_ordered_root(input: Vec>, version: StateVersion) -> H256 { 416 | warn!("trie::keccak_256_ordered_root() unimplemented"); 417 | H256::default() 418 | } 419 | 420 | /// Verify trie proof 421 | fn blake2_256_verify_proof_version_1( 422 | root: H256, 423 | proof: &[Vec], 424 | key: &[u8], 425 | value: &[u8], 426 | ) -> bool { 427 | warn!("trie::blake2_256_verify_proof() unimplemented"); 428 | false 429 | } 430 | 431 | /// Verify trie proof 432 | fn blake2_256_verify_proof( 433 | root: H256, 434 | proof: &[Vec], 435 | key: &[u8], 436 | value: &[u8], 437 | version: StateVersion, 438 | ) -> bool { 439 | warn!("trie::blake2_256_verify_proof() unimplemented"); 440 | false 441 | } 442 | 443 | /// Verify trie proof 444 | fn keccak_256_verify_proof_version_1( 445 | root: H256, 446 | proof: &[Vec], 447 | key: &[u8], 448 | value: &[u8], 449 | ) -> bool { 450 | warn!("trie::keccak_256_verify_proof() unimplemented"); 451 | false 452 | } 453 | 454 | /// Verify trie proof 455 | fn keccak_256_verify_proof( 456 | root: H256, 457 | proof: &[Vec], 458 | key: &[u8], 459 | value: &[u8], 460 | version: StateVersion, 461 | ) -> bool { 462 | warn!("trie::keccak_256_verify_proof() unimplemented"); 463 | false 464 | } 465 | } 466 | 467 | pub mod misc { 468 | use super::*; 469 | /// Print a number. 470 | pub fn print_num(val: u64) { 471 | debug!(target: "runtime", "{}", val); 472 | } 473 | 474 | /// Print any valid `utf8` buffer. 475 | pub fn print_utf8(utf8: &[u8]) { 476 | if let Ok(data) = std::str::from_utf8(utf8) { 477 | debug!(target: "runtime", "{}", data) 478 | } 479 | } 480 | 481 | /// Print any `u8` slice as hex. 482 | pub fn print_hex(data: &[u8]) { 483 | debug!(target: "runtime", "{:?}", data); 484 | } 485 | 486 | pub fn runtime_version(wasm: &[u8]) -> Option> { 487 | warn!("misc::runtime_version unimplemented!"); 488 | Some([2u8; 32].to_vec()) 489 | } 490 | } 491 | 492 | /// Interfaces for working with crypto related types from within the runtime. 493 | pub mod crypto { 494 | use super::*; 495 | use sp_core::H512; 496 | pub fn ed25519_public_keys(id: KeyTypeId) -> Vec { 497 | warn!("crypto::ed25519_public_keys unimplemented"); 498 | vec![ed25519::Public::from_h256(H256::default())] 499 | } 500 | 501 | pub fn ed25519_generate(id: KeyTypeId, seed: Option>) -> ed25519::Public { 502 | warn!("crypto::ed25519_generate unimplemented"); 503 | ed25519::Public::from_h256(H256::default()) 504 | } 505 | 506 | pub fn ed25519_sign( 507 | id: KeyTypeId, 508 | pub_key: &ed25519::Public, 509 | msg: &[u8], 510 | ) -> Option { 511 | warn!("crypto::ed25519_sign unimplemented"); 512 | 513 | Some(ed25519::Signature::from_raw(H512::default().into())) 514 | } 515 | 516 | pub fn ed25519_verify(sig: &ed25519::Signature, msg: &[u8], pub_key: &ed25519::Public) -> bool { 517 | ed25519::Pair::verify(sig, msg, pub_key) 518 | } 519 | 520 | pub fn ed25519_batch_verify( 521 | sig: &ed25519::Signature, 522 | msg: &[u8], 523 | pub_key: &ed25519::Public, 524 | ) -> bool { 525 | warn!("crypto::ed25519_batch_verify unimplemented"); 526 | false 527 | } 528 | 529 | /// Register a `sr25519` signature for batch verification. 530 | /// 531 | /// Batch verification must be enabled by calling [`start_batch_verify`]. 532 | /// If batch verification is not enabled, the signature will be verified immediatley. 533 | /// To get the result of the batch verification, [`finish_batch_verify`] 534 | /// needs to be called. 535 | /// 536 | /// Returns `true` when the verification is either successful or batched. 537 | pub fn sr25519_batch_verify( 538 | sig: &sr25519::Signature, 539 | msg: &[u8], 540 | pub_key: &sr25519::Public, 541 | ) -> bool { 542 | warn!("crypto::sr25519_batch_verify unimplemented"); 543 | false 544 | } 545 | /// Start verification extension. 546 | pub fn start_batch_verify() { 547 | warn!("crypto::start_batch_verify unimplemented"); 548 | } 549 | 550 | pub fn finish_batch_verify() -> bool { 551 | warn!("crypto::finish_batch_verify unimplemented"); 552 | true 553 | } 554 | 555 | pub fn sr25519_public_keys(id: KeyTypeId) -> Vec { 556 | warn!("crypto::sr25519_public_key unimplemented"); 557 | vec![sr25519::Public::from_h256(H256::default())] 558 | } 559 | 560 | pub fn sr25519_generate(id: KeyTypeId, seed: Option>) -> sr25519::Public { 561 | warn!("crypto::sr25519_generate unimplemented"); 562 | sr25519::Public::from_h256(H256::default()) 563 | } 564 | 565 | pub fn sr25519_sign( 566 | id: KeyTypeId, 567 | pubkey: &sr25519::Public, 568 | msg: &[u8], 569 | ) -> Option { 570 | warn!("crypto::sr25519_sign unimplemented"); 571 | Some(sr25519::Signature::from_raw(H512::default().into())) 572 | } 573 | 574 | /// Verify `sr25519` signature. 575 | /// 576 | /// Returns `true` when the verification was successful. 577 | pub fn sr25519_verify(sig: &sr25519::Signature, msg: &[u8], pub_key: &sr25519::Public) -> bool { 578 | sr25519::Pair::verify(sig, msg, pub_key) 579 | } 580 | 581 | /// Returns all `ecdsa` public keys for the given key id from the keystore. 582 | pub fn ecdsa_public_keys(id: KeyTypeId) -> Vec { 583 | warn!("crypto::ecdsa_public_keys unimplemented"); 584 | Vec::new() 585 | } 586 | 587 | /// Generate an `ecdsa` key for the given key type using an optional `seed` and 588 | /// store it in the keystore. 589 | /// 590 | /// The `seed` needs to be a valid utf8. 591 | /// 592 | /// Returns the public key. 593 | pub fn ecdsa_generate(id: KeyTypeId, seed: Option>) -> ecdsa::Public { 594 | warn!("crypto::ecdsa_generate unimplemented"); 595 | let raw: [u8; 33] = [0; 33]; 596 | ecdsa::Public::from_raw(raw) 597 | } 598 | 599 | /// Sign the given `msg` with the `ecdsa` key that corresponds to the given public key and 600 | /// key type in the keystore. 601 | /// 602 | /// Returns the signature. 603 | pub fn ecdsa_sign( 604 | id: KeyTypeId, 605 | pub_key: &ecdsa::Public, 606 | msg: &[u8], 607 | ) -> Option { 608 | warn!("crypto::ecdsa_sign unimplemented"); 609 | None 610 | } 611 | 612 | /// Verify `ecdsa` signature. 613 | /// 614 | /// Returns `true` when the verification was successful. 615 | pub fn ecdsa_verify(sig: &ecdsa::Signature, msg: &[u8], pub_key: &ecdsa::Public) -> bool { 616 | ecdsa::Pair::verify(sig, msg, pub_key) 617 | } 618 | 619 | /// Register a `ecdsa` signature for batch verification. 620 | /// 621 | /// Batch verification must be enabled by calling [`start_batch_verify`]. 622 | /// If batch verification is not enabled, the signature will be verified immediatley. 623 | /// To get the result of the batch verification, [`finish_batch_verify`] 624 | /// needs to be called. 625 | /// 626 | /// Returns `true` when the verification is either successful or batched. 627 | pub fn ecdsa_batch_verify(sig: &ecdsa::Signature, msg: &[u8], pub_key: &ecdsa::Public) -> bool { 628 | warn!("crypto::ecdsa_batch_verify unimplemented"); 629 | false 630 | } 631 | 632 | pub fn secp256k1_ecdsa_recover( 633 | sig: &[u8; 65], 634 | msg: &[u8; 32], 635 | ) -> Result<[u8; 64], EcdsaVerifyError> { 636 | let rs = libsecp256k1::Signature::parse_standard_slice(&sig[0..64]) 637 | .map_err(|_| EcdsaVerifyError::BadRS)?; 638 | let v = libsecp256k1::RecoveryId::parse( 639 | if sig[64] > 26 { sig[64] - 27 } else { sig[64] } as u8 640 | ) 641 | .map_err(|_| EcdsaVerifyError::BadV)?; 642 | let pubkey = libsecp256k1::recover(&libsecp256k1::Message::parse(msg), &rs, &v) 643 | .map_err(|_| EcdsaVerifyError::BadSignature)?; 644 | let mut res = [0u8; 64]; 645 | res.copy_from_slice(&pubkey.serialize()[1..65]); 646 | 647 | Ok(res) 648 | } 649 | 650 | pub fn secp256k1_ecdsa_recover_compressed( 651 | sig: &[u8; 65], 652 | msg: &[u8; 32], 653 | ) -> Result<[u8; 33], EcdsaVerifyError> { 654 | warn!("crypto::secp256k1_ecdsa_recover unimplemented"); 655 | Ok([0; 33]) 656 | } 657 | } 658 | 659 | /// Interface that provides functions for hashing with different algorithms. 660 | pub mod hashing { 661 | use super::*; 662 | /// Conduct a 256-bit Keccak hash. 663 | pub fn keccak_256(data: &[u8]) -> [u8; 32] { 664 | debug!("keccak_256 of {}", encode_hex(data)); 665 | let hash = sp_core::hashing::keccak_256(data); 666 | debug!(" returning hash {}", encode_hex(&hash)); 667 | hash 668 | } 669 | 670 | /// Conduct a 512-bit Keccak hash. 671 | pub fn keccak_512(data: &[u8]) -> [u8; 64] { 672 | debug!("keccak_512 of {}", encode_hex(data)); 673 | let hash = sp_core::hashing::keccak_512(data); 674 | debug!(" returning hash {}", encode_hex(&hash)); 675 | hash 676 | } 677 | 678 | /// Conduct a 256-bit Sha2 hash. 679 | pub fn sha2_256(data: &[u8]) -> [u8; 32] { 680 | debug!("sha2_256 of {}", encode_hex(data)); 681 | let hash = sp_core::hashing::sha2_256(data); 682 | debug!(" returning hash {}", encode_hex(&hash)); 683 | hash 684 | } 685 | 686 | /// Conduct a 128-bit Blake2 hash. 687 | pub fn blake2_128(data: &[u8]) -> [u8; 16] { 688 | debug!("blake2_128 of {}", encode_hex(data)); 689 | let hash = sp_core::hashing::blake2_128(data); 690 | debug!(" returning hash {}", encode_hex(&hash)); 691 | hash 692 | } 693 | 694 | /// Conduct a 256-bit Blake2 hash. 695 | pub fn blake2_256(data: &[u8]) -> [u8; 32] { 696 | debug!("blake2_256 of {}", encode_hex(data)); 697 | let hash = sp_core::hashing::blake2_256(data); 698 | debug!(" returning hash {}", encode_hex(&hash)); 699 | hash 700 | } 701 | 702 | /// Conduct four XX hashes to give a 256-bit result. 703 | pub fn twox_256(data: &[u8]) -> [u8; 32] { 704 | debug!("twox_256 of {}", encode_hex(data)); 705 | let hash = sp_core::hashing::twox_256(data); 706 | debug!(" returning {}", encode_hex(&hash)); 707 | hash 708 | } 709 | 710 | /// Conduct two XX hashes to give a 128-bit result. 711 | pub fn twox_128(data: &[u8]) -> [u8; 16] { 712 | debug!("twox_128 of {}", encode_hex(data)); 713 | let hash = sp_core::hashing::twox_128(data); 714 | debug!(" returning {}", encode_hex(&hash)); 715 | hash 716 | } 717 | 718 | /// Conduct two XX hashes to give a 64-bit result. 719 | pub fn twox_64(data: &[u8]) -> [u8; 8] { 720 | debug!("twox_64 of {}", encode_hex(data)); 721 | let hash = sp_core::hashing::twox_64(data); 722 | debug!(" returning {}", encode_hex(&hash)); 723 | hash 724 | } 725 | } 726 | 727 | /// Interface that provides transaction indexing API. 728 | pub mod transaction_index { 729 | use super::*; 730 | /// Add transaction index. Returns indexed content hash. 731 | fn index(extrinsic: u32, size: u32, context_hash: [u8; 32]) { 732 | warn!("transaction_index::index unimplemented"); 733 | } 734 | 735 | /// Conduct a 512-bit Keccak hash. 736 | fn renew(extrinsic: u32, context_hash: [u8; 32]) { 737 | warn!("transaction_index::renew unimplemented"); 738 | } 739 | } 740 | 741 | pub mod offchain_index { 742 | use super::*; 743 | /// Write a key value pair to the Offchain DB database in a buffered fashion. 744 | pub fn set(key: &[u8], value: &[u8]) { 745 | warn!("offchain_index::set unimplemented"); 746 | } 747 | 748 | /// Remove a key and its associated value from the Offchain DB. 749 | pub fn clear(key: &[u8]) { 750 | warn!("offchain_index::clear unimplemented"); 751 | } 752 | } 753 | 754 | /// Interface that provides functions to access the offchain functionality. 755 | /// 756 | /// These functions are being made available to the runtime and are called by the runtime. 757 | pub mod offchain { 758 | use super::*; 759 | 760 | pub fn is_validator() -> bool { 761 | warn!("offchain::is_validator unimplemented"); 762 | false 763 | } 764 | 765 | pub fn submit_transaction(data: Vec) -> Result<(), ()> { 766 | warn!("offchain::submit_transaction unimplemented"); 767 | Err(()) 768 | } 769 | 770 | pub fn network_state() -> Result { 771 | warn!("offchain::network_state unimplemented"); 772 | Err(()) 773 | } 774 | 775 | pub fn timestamp() -> offchain::Timestamp { 776 | warn!("offchain::timestamp unimplemented"); 777 | offchain::Timestamp::default() 778 | } 779 | 780 | pub fn sleep_until(deadline: offchain::Timestamp) { 781 | warn!("offchain::sleep_until unimplemented"); 782 | } 783 | 784 | pub fn random_seed() -> [u8; 32] { 785 | warn!("offchain::random_seed unimplemented"); 786 | [0; 32] 787 | } 788 | 789 | pub fn local_storage_set(kind: offchain::StorageKind, key: &[u8], value: &[u8]) { 790 | warn!("offchain::local_storage_set unimplemented"); 791 | } 792 | pub fn local_storage_clear(kind: StorageKind, key: &[u8]) { 793 | warn!("offchain::local_storage_clear unimplemented"); 794 | } 795 | 796 | pub fn local_storage_compare_and_set( 797 | kind: offchain::StorageKind, 798 | key: &[u8], 799 | old_value: Option>, 800 | new_value: &[u8], 801 | ) -> bool { 802 | warn!("offchain::local_storage_compare_and_set unimplemented"); 803 | false 804 | } 805 | 806 | pub fn local_storage_get(kind: offchain::StorageKind, key: &[u8]) -> Option> { 807 | warn!("offchain::local_storage_get unimplemented"); 808 | None 809 | } 810 | 811 | pub fn http_request_start( 812 | method: &str, 813 | uri: &str, 814 | meta: &[u8], 815 | ) -> Result { 816 | warn!("offchain::http_request_start unimplemented"); 817 | Err(()) 818 | } 819 | 820 | pub fn http_request_add_header( 821 | request_id: offchain::HttpRequestId, 822 | name: &str, 823 | value: &str, 824 | ) -> Result<(), ()> { 825 | warn!("offchain::http_request_add_header unimplemented"); 826 | Err(()) 827 | } 828 | 829 | pub fn http_request_write_body( 830 | request_id: offchain::HttpRequestId, 831 | chunk: &[u8], 832 | deadline: Option, 833 | ) -> Result<(), offchain::HttpError> { 834 | warn!("offchain::http_request_write_body unimplemented"); 835 | Err(offchain::HttpError::IoError) 836 | } 837 | 838 | pub fn http_response_wait( 839 | ids: &[offchain::HttpRequestId], 840 | deadline: Option, 841 | ) -> Vec { 842 | warn!("offchain::http_response_wait unimplemented"); 843 | Vec::new() 844 | } 845 | 846 | pub fn http_response_headers(request_id: offchain::HttpRequestId) -> Vec<(Vec, Vec)> { 847 | warn!("offchain::http_response_wait unimplemented"); 848 | Vec::new() 849 | } 850 | 851 | pub fn http_response_read_body( 852 | request_id: offchain::HttpRequestId, 853 | buffer: &mut [u8], 854 | deadline: Option, 855 | ) -> Result { 856 | warn!("offchain::http_response_read_body unimplemented"); 857 | Err(offchain::HttpError::IoError) 858 | } 859 | } 860 | 861 | /// Interface that provides functions for logging from within the runtime. 862 | pub mod logging { 863 | use super::*; 864 | use sp_core::{LogLevel, LogLevelFilter}; 865 | /// Request to print a log message on the host. 866 | /// 867 | /// Note that this will be only displayed if the host is enabled to display log messages with 868 | /// given level and target. 869 | /// 870 | /// Instead of using directly, prefer setting up `RuntimeLogger` and using `log` macros. 871 | pub fn log(level: LogLevel, target: &str, message: &[u8]) { 872 | if let Ok(message) = std::str::from_utf8(message) { 873 | // TODO remove this attention boost 874 | println!("\x1b[0;36m[{}]\x1b[0m {}", target, message); 875 | let level = match level { 876 | LogLevel::Error => log::Level::Error, 877 | LogLevel::Warn => log::Level::Warn, 878 | LogLevel::Info => log::Level::Info, 879 | LogLevel::Debug => log::Level::Debug, 880 | LogLevel::Trace => log::Level::Trace, 881 | }; 882 | // FIXME: this logs with target sp_io::logging instead of the provided target! 883 | log::log!(target: target, level, "{}", message,); 884 | } 885 | } 886 | 887 | /// Returns the max log level used by the host. 888 | pub fn max_level() -> LogLevelFilter { 889 | log::max_level().into() 890 | } 891 | } 892 | 893 | mod tracing_setup { 894 | /// Initialize tracing of sp_tracing not necessary – noop. To enable build 895 | /// without std and with the `with-tracing`-feature. 896 | pub fn init_tracing() {} 897 | } 898 | 899 | pub use tracing_setup::init_tracing; 900 | 901 | #[cfg(test)] 902 | mod tests { 903 | use super::*; 904 | use hex_literal::hex; 905 | use sp_core::{map, storage::well_known_keys::CODE, H256}; 906 | 907 | #[test] 908 | fn storage_set_and_retrieve_works() { 909 | let mut ext = SgxExternalities::default(); 910 | 911 | ext.execute_with(|| { 912 | storage::set(b"doe".to_vec().as_slice(), b"reindeer".to_vec().as_slice()); 913 | storage::set(b"dog".to_vec().as_slice(), b"puppy".to_vec().as_slice()); 914 | storage::set(b"dogglesworth".to_vec().as_slice(), b"cat".to_vec().as_slice()); 915 | }); 916 | 917 | ext.execute_with(|| { 918 | assert!(storage::get(b"doe".to_vec().as_slice()).is_some()); 919 | assert!(storage::get(b"dog".to_vec().as_slice()).is_some()); 920 | assert!(storage::get(b"dogglesworth".to_vec().as_slice()).is_some()); 921 | assert!(storage::get(b"boat".to_vec().as_slice()).is_none()); 922 | }); 923 | } 924 | 925 | #[test] 926 | fn externalities_set_and_retrieve_code() { 927 | let mut ext = SgxExternalities::default(); 928 | 929 | let code = vec![1, 2, 3]; 930 | ext.insert(CODE.to_vec(), code.clone()); 931 | 932 | assert_eq!(ext.get(CODE).unwrap(), &code); 933 | } 934 | } 935 | -------------------------------------------------------------------------------- /test-no-std/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "test-no-std" 3 | version = "0.1.0" 4 | authors = ["Integritee AG "] 5 | edition = "2018" 6 | 7 | [target.'cfg(not(target_env = "sgx"))'.dependencies] 8 | sgx_tstd = { features = ["untrusted_fs", "net", "backtrace"], git = "https://github.com/apache/teaclave-sgx-sdk.git", branch = "master" } 9 | 10 | [dependencies] 11 | libc = { version = "0.2", default-features = false } 12 | sgx-runtime = { path = "../runtime", default-features = false } 13 | sp-io = { path = "../substrate-sgx/sp-io", default-features = false, features = ["disable_oom", "disable_panic_handler", "disable_allocator", "sgx"] } 14 | sp-application-crypto = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 15 | sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" } 16 | 17 | [features] 18 | evm = ["sgx-runtime/evm"] -------------------------------------------------------------------------------- /test-no-std/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017-2018 Baidu, Inc. All Rights Reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions 5 | # are met: 6 | # 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in 11 | # the documentation and/or other materials provided with the 12 | # distribution. 13 | # * Neither the name of Baidu, Inc., nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | Rust_Enclave_Name := libenclave.a 30 | Rust_Enclave_Files := $(wildcard src/*.rs) 31 | Rust_Target_Path := $(CURDIR)/../../../xargo 32 | 33 | ifeq ($(SGX_DEBUG), 1) 34 | OUTPUT_PATH := debug 35 | CARGO_TARGET := 36 | else 37 | OUTPUT_PATH := release 38 | CARGO_TARGET := --release 39 | endif 40 | 41 | .PHONY: all 42 | 43 | all: $(Rust_Enclave_Name) 44 | 45 | $(Rust_Enclave_Name): $(Rust_Enclave_Files) 46 | ifeq ($(XARGO_SGX), 1) 47 | RUST_TARGET_PATH=$(Rust_Target_Path) xargo build --target x86_64-unknown-linux-sgx $(CARGO_TARGET) 48 | else 49 | cargo build $(CARGO_TARGET) 50 | endif 51 | -------------------------------------------------------------------------------- /test-no-std/src/main.rs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021 Integritee AG and Supercomputing Systems AG 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #![feature(start, libc, lang_items)] 18 | #![feature(alloc_error_handler)] 19 | #![no_std] 20 | #![no_main] 21 | 22 | extern crate sgx_tstd as std; 23 | // extern crate rstd; 24 | // DUT 25 | 26 | // The libc crate allows importing functions from C. 27 | extern crate libc; 28 | 29 | // A list of C functions that are being imported 30 | extern "C" { 31 | pub fn printf(format: *const u8, ...) -> i32; 32 | } 33 | 34 | #[no_mangle] 35 | // The main function, with its input arguments ignored, and an exit status is returned 36 | pub extern "C" fn main(_nargs: i32, _args: *const *const u8) -> i32 { 37 | // Print "Hello, World" to stdout using printf 38 | unsafe { 39 | printf(b"Hello, World!\n" as *const u8); 40 | } 41 | 42 | // Exit with a return status of 0. 43 | 0 44 | } 45 | --------------------------------------------------------------------------------