MCPcopy Index your code
hub / github.com/cloudwalk/stratus

github.com/cloudwalk/stratus @v0.27.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.27.0 ↗ · + Follow
1,345 symbols 3,266 edges 214 files 273 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

codecov

Stratus ☁️

Welcome to Stratus, the cutting-edge EVM-compatible ledger and JSON-RPC server. This projects has 3 focuses of optimization:

  1. Reliability: We have nodes running for months without any sort of restart or maintenance, and we give you the tools needed to do maintenance on the leader node with less than 5 seconds of downtime.
  2. Observability: We have a lot of metric, logs, tracing implemented so that you can effectively monitor every aspect of the application.
  3. Performance: By not aiming to be a blockchain (i.e. no decentralization) and by optimizing for scenarios with a limited number of contracts, we've been able to get single-token performances unheardof in any other evm-compatible ledger. Currently we can achieve around 500M gas per second*.

You'd be hard pressed to find a private evm-compatible ledger solution that achieves those 3 factors as well as we do.

*: Although you can find some that can do more GPS than us, it is measured on scenarios were the contracts are completely independent, such as n separate erc20-tokens. These types of executions can be parallelized, but we removed this feature from stratus in favor of optimizing for scenarios where transactions are mostly dependant on one another.

**: This varies greatly depending on the contract implementation. Since gas costs are stipulated for traditional blockchains, gas throughput is not the ideal proxy for a performance metric on Stratus.

Getting Started with Stratus

To run the optimized version of Stratus, ensure you have installed the dependencies:

Then simply run:

RELEASE=1 just run

If you want to use OpenTelemery use the flag --tracing-url <url> and pass the url of your OpenTelemetry collector of choice. Jaeger is included in the compose file, its collector url is http://localhost:4317 and the ui can be accessed at localhost:16686 on your browser.

Testing

To run tests, you also need to:

  • Install Git
  • Install asdf version manager and use it to install
  • Node.js v20.10.0 and v21.6.1
  • Solidity v0.8.16

Configure the test environment with

just setup

Then run one of test recipes we provide. You can just | grep test to see them. To see all available tasks you can simply run just.

We recommend using just recipes whenever applicable.

Join the Party

We love contributions! Check out our Contributing Guide and help make Stratus even more awesome.

License

Stratus is licensed under the MIT license.

Extension points exported contracts — how you extend this code

SerializeDeserializeWithContext (Interface)
(no doc) [39 implementers]
src/eth/storage/permanent/rocks/mod.rs
WithCommonConfig (Interface)
(no doc) [4 implementers]
src/config.rs
DisplayExt (Interface)
Allows to implement `to_string` for types that does not have it. [2 implementers]
src/ext.rs
SpanExt (Interface)
Extensions for `tracing::Span`. [1 implementers]
src/infra/tracing/tracing_services.rs
Event (Interface)
Struct is an event that can be published to external systems. [1 implementers]
src/ledger/events.rs
FakeEnum (Interface)
(no doc)
crates/stratus_macros/tests/fake_enum_derive_tests.rs
GenesisAccount (Interface)
(no doc)
e2e/test/genesis/helpers.ts
ImporterWorker (Interface)
(no doc) [3 implementers]
src/eth/follower/importer/importers/mod.rs

Core symbols most depended-on inside this repo

eq
called by 332
src/eth/executor/evm_input.rs
send
called by 217
e2e/test/helpers/rpc.ts
get
called by 112
src/eth/storage/permanent/rocks/rocks_cf.rs
sendEvmMine
called by 107
e2e/test/helpers/rpc.ts
sendWithRetry
called by 96
e2e/cloudwalk-contracts/integration/test/helpers/rpc.ts
updateProviderUrl
called by 95
e2e/cloudwalk-contracts/integration/test/helpers/rpc.ts
toHex
called by 93
e2e/test/helpers/rpc.ts
sendAndGetFullResponse
called by 62
e2e/cloudwalk-contracts/integration/test/helpers/rpc.ts

Shape

Method 666
Function 429
Class 179
Enum 44
Interface 27

Languages

Rust88%
TypeScript9%
Python2%
Ruby1%

Modules by API surface

src/eth/rpc/rpc_server.rs77 symbols
e2e/test/helpers/rpc.ts43 symbols
src/eth/storage/stratus_storage.rs37 symbols
src/eth/storage/permanent/rocks/rocks_state.rs37 symbols
src/globals.rs29 symbols
src/infra/tracing/tracing_services.rs27 symbols
src/eth/miner/miner.rs27 symbols
e2e/cloudwalk-contracts/integration/test/helpers/rpc.ts27 symbols
src/eth/executor/evm.rs26 symbols
src/eth/storage/permanent/rocks/rocks_permanent.rs25 symbols
src/eth/storage/permanent/rocks/rocks_cf.rs25 symbols
src/eth/rpc/rpc_subscriptions.rs25 symbols

For agents

$ claude mcp add stratus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact