|
1 | 1 | # zenith-rs
|
2 | 2 |
|
3 |
| -Rust utilites for working with [Zenith](https://github.com/init4tech/zenith). |
| 3 | +Rust types & utilities for working with [Zenith](https://github.com/init4tech/zenith). |
4 | 4 |
|
5 | 5 |  
|
6 | 6 |
|
7 |
| -## Crates |
8 |
| - |
9 |
| -- `zenith-types`: Common types used by other crates. |
10 |
| -- `zenith-builder-example`: a block building example that uses the `builder` library. |
11 |
| - |
12 | 7 | ## Development
|
13 | 8 |
|
14 |
| -This crate contains an example block builder in the Signet ecosystem. |
15 |
| - |
16 |
| -### Requirements |
17 |
| - |
18 |
| -- Rust 1.79.0 |
19 |
| -- Cargo [Lambda](https://www.cargo-lambda.info/) |
20 |
| -- AWS CLI and credentials |
21 |
| - |
22 |
| -### Environment |
23 |
| - |
24 |
| -The following environment variables are exposed to configure the Builder: |
25 |
| - |
26 |
| -```bash |
27 |
| -# Builder Configs |
28 |
| -HOST_CHAIN_ID="17000" # Holesky Testnet |
29 |
| -RU_CHAIN_ID="17001" |
30 |
| -HOST_RPC_URL="http://host.url.here" |
31 |
| -ZENITH_ADDRESS="ZENITH_ADDRESS_HERE" |
32 |
| -QUINCEY_URL="http://signer.url.here" |
33 |
| -BUILDER_PORT="8080" |
34 |
| -BUILDER_KEY="YOUR_BUILDER_KEY_HERE" |
35 |
| -INCOMING_TRANSACTIONS_BUFFER="10" |
36 |
| -BLOCK_CONFIRMATION_BUFFER="10" |
37 |
| -BUILDER_REWARDS_ADDRESS="BUILDER_REWARDS_ADDRESS_HERE" |
38 |
| -ROLLUP_BLOCK_GAS_LIMIT="30000000" |
39 |
| -# Transaction Pool Configs |
40 |
| -TX_POOL_URL="http://pool.url.here/" # trailing slash is required |
41 |
| -TX_POOL_POLL_INTERVAL="5" # seconds |
42 |
| -TX_POOL_CACHE_DURATION="600" # seconds |
43 |
| -``` |
44 |
| - |
45 |
| -## API |
46 |
| - |
47 |
| -### SignRequest |
48 |
| - |
49 |
| -Sign request example payload: |
| 9 | +This project requires Rust 1.82.0 or newer. |
50 | 10 |
|
51 |
| -```json |
52 |
| -{ |
53 |
| - "hostBlockNumber": "0x0", |
54 |
| - "hostChainId": "0x1", |
55 |
| - "ruChainId": "0x2", |
56 |
| - "gasLimit": "0x5", |
57 |
| - "ruRewardAddress": "0x0606060606060606060606060606060606060606", |
58 |
| - "contents": "0x0707070707070707070707070707070707070707070707070707070707070707" |
59 |
| -} |
60 |
| -``` |
| 11 | +To build the project, run `make build`. To run tests, run `make test`. Before committing code, make sure to run `make tidy`, which will run clippy and format the whole project. |
0 commit comments