https://github.com/blockscout/blockscout-rs
https://github.com/blockscout/blockscout-rs
rust
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/blockscout/blockscout-rs
- Owner: blockscout
- License: mit
- Created: 2022-05-20T12:38:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T16:17:29.000Z (about 1 year ago)
- Last Synced: 2024-04-14T05:46:18.212Z (about 1 year ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 4.89 MB
- Stars: 117
- Watchers: 10
- Forks: 85
- Open Issues: 121
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
Blockscout Rust Services
A set of services used by [Blockscout](https://blockscout.com/) blockchain explorer, written in Rust.
## Services
1. [blockscout-ens](blockscout-ens) - indexed data of domain name service for blockscout instances.
2. [da-indexer](da-indexer) - collects blobs from different DA solutions (e.g, Celestia)
3. [eth-bytecode-db](eth-bytecode-db/) - Ethereum Bytecode Database. Cross-chain smart-contracts database used for automatic contracts verification
4. [proxy-verifier](proxy-verifier) - backend for the standalone multi-chain verification service
5. [sig-provider](sig-provider/) - aggregator of ethereum signatures for transactions and events
6. [smart-contract-verifier](smart-contract-verifier/) - smart-contracts verification
7. [stats](stats) - service designed to calculate and present statistical information from a Blockscout instance
8. [user-ops-indexer](user-ops-indexer) - service designed to index, decode and serve user operations as per the ERC-4337 standard
9. [visualizer](visualizer/) - service for evm visualization such as:
1. Solidity contract visualization using [sol2uml](https://www.npmjs.com/package/sol2uml)## Running and configuring services
Services are distributed as docker images. For each service, you can find information about packages and their recent releases
inside service directories.You can configure your app by passing the necessary environment variables when starting the container.
Configuration variables common for all services can be found [here](docs/common-envs.md).
See full list of ENVs and their description inside service directories.```shell
docker run -p 8050:8050 --env-file ghcr.io/blockscout/{service-name}:latest
```Alternatively, you can build your own docker images or compile them directly from sources.
Some of such options are described in [build](docs/build.md).## Project Layouts
Most of the projects consist of 3 main parts:
1. `{service-name}-proto` - defines the gRPC proto file with all API related data.
Defines mapping HTTP/JSON requests and their parameters to those gRPC methods.
2. `{service-name}-logic` - the crate with the implementation of the main business logic.
_Note: previously the logic crate was named as `{service-name}`;
some services still use that convention_3. `{service-name}-server` - initialize the server using the defined API.
Using the methods from “{service-name}-logic” to handle incoming requests.The separation on "logic" and "server" crates is designed to separate functional and transport layers.
For now, "server" crates contain gRPC and HTTP as the transport layer.
It was assumed, that users may want to implement their own APIs, for which the library with functional logic might be used.Crates that require database connection may also have additional `sea-orm`-defined crates:
1. `{service-name}-migration` - contains migrations for the database
2. `{service-name}-entity` - contains the entity files generated from the schema## Contributing
We appreciate your support. Before writing code and submitting a pull request, please read contributing [instructions](CONTRIBUTING.md).
## License
This project is primarily distributed under the terms of the MIT license. See [LICENSE-MIT](LICENSE-MIT) for details.