|
| 1 | +# Maru AGENTS.md file |
| 2 | + |
| 3 | +Maru is an Ethereum Consensus client that implements QBFT Consensus algorithm. It's meant to be used on Ethereum L2-s, |
| 4 | +the main focus is on Linea support. The main purpose or Maru is to enable the usage the existing Ethereum EL clients on |
| 5 | +Linea by setting the head of the chain with the Engine API. For that Maru maintains its own beacon chain, can peer with |
| 6 | +and sync from other Maru clients, same as other CL and EL Clients. |
| 7 | + |
| 8 | +## Code style and quality |
| 9 | +- Please use best practices from "Software Engineering at Google" book. Please aim to keep the code clean, readable and maintainable |
| 10 | +- When writing new classes, please stick to the OOP, SOLID principles and GOF Design Patterns |
| 11 | +- When adding a new file and the code, please refer to the existing files to write new code in a way that is uniform with the existing codebase |
| 12 | +- Kotlin is our main programming language. When writing new code, please avoid Java-like style and use Kotlin-native |
| 13 | + idioms |
| 14 | +- Every time you're tempted to use inheritance, think again and use composition instead |
| 15 | +- Avoid in line comments. Use variable/function/class names and tests as a documentation. Note that javadocs near |
| 16 | + classes and methods are fine in case they're really necessary |
| 17 | +- Please respect ktlint and .editorconfig rules |
| 18 | + |
| 19 | +## Dev environment tips |
| 20 | +- The whole project can be built by `make build` or simply `./gradlew build`. Note that it takes a few minutes to |
| 21 | + run all the tests |
| 22 | +- Code can be formatted by `make spotless-happy` or `./gradlew spotlessApply` |
| 23 | +- When running the tests and debugging issues, please don't rely on console output, but rather parse the test |
| 24 | + results html generated by Gradle directly |
| 25 | + |
| 26 | +## General instructions |
| 27 | +- Before considering the work complete, ALWAYS make sure: |
| 28 | + - The whole project compiles |
| 29 | + - The code is properly formatted |
0 commit comments