1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
//! # Shadow //! //! [![Shadow][workflow-badge]][github] //! [![crate](https://img.shields.io/crates/v/darwinia-shadow.svg)](https://crates.io/crates/darwinia_shadow) //! [![doc](https://img.shields.io/badge/current-docs-brightgreen.svg)](https://docs.rs/darwinia_shadow/) //! [![LICENSE](https://img.shields.io/crates/l/darwinia-shadow.svg)](https://choosealicense.com/licenses/gpl-3.0/) //! //! The shadow service for relayers and verify workers to retrieve header data and generate proof. Shadow will index the data it needs from blockchain nodes, such as Ethereum and Darwinia. //! //! //! ## Usage //! //! ```sh //! shadow 0.2.5 //! //! USAGE: //! shadow <SUBCOMMAND> //! //! FLAGS: //! -h, --help Prints help information //! -V, --version Prints version information //! //! SUBCOMMANDS: //! count Current block height in mmr store //! help Prints this message or the help of the given subcommand(s) //! run Start shadow service //! trim Trim mmr from target leaf //! ``` //! //! //! ## Download //! //! ```sh //! $ cargo install darwinia-shadow //! ``` //! //! //! ### Note //! //! + Please make sure you have `golang` installed in your machine //! + Please make sure you have `sqlite3` installed in your machine //! //! //! ## Environment //! //! | ENV | Desc | Example | //! |--------------------|--------------------------|------------------------------------| //! | `ETHEREUM_RPC` | The rpc of ethereum node | ETHEREUM_RPC=http://localhost:8545 | //! | `ETHEREUM_ROPSTEN` | Enable ropsten source | ETHEREUM_ROPSTEN=true | //! | `MMR_LOG` | The gap of mmr logs | MMR_LOG=10000 | //! //! ## Trouble Shooting //! //! Everytime you run `proof` in error, please delete `~/.ethashproof` and `~/.ethash` //! and retry. //! //! //! ## LICENSE //! //! GPL-3.0 //! //! //! [github]: https://github.com/darwinia-network/shadow //! [workflow-badge]: https://github.com/darwinia-network/shadow/workflows/shadow/badge.svg #![warn(missing_docs)] #![allow(clippy::transmute_ptr_to_ptr)] #![allow(clippy::ptr_offset_with_cast)] #![allow(clippy::assign_op_pattern)] #![allow(clippy::assign_op_pattern)] #![allow(clippy::too_many_arguments)] #[macro_use] extern crate log; #[macro_use] extern crate serde; mod conf; mod shared; pub mod api; pub mod chain; pub mod cmd; pub mod mmr; pub mod result; pub use shared::ShadowShared;