|
| 1 | +# Contributing to magicblock-validator |
| 2 | + |
| 3 | +Thanks for contributing. This repository implements a high-performance, long-running solana execution engine. |
| 4 | +Correctness, determinism, and operational safety matter more than velocity. |
| 5 | + |
| 6 | +Please keep contributions **small, explicit, and reviewable**. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Scope & Philosophy |
| 11 | + |
| 12 | +- Prefer **minimal changes** over broad refactors. |
| 13 | +- Avoid speculative abstractions. |
| 14 | +- Treat config, CLI flags, and on-disk formats as **public interfaces**. |
| 15 | +- Backward compatibility is the default. |
| 16 | + |
| 17 | +If you are unsure whether a change belongs here, start a **Discussion**. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Pull Requests |
| 22 | + |
| 23 | + |
| 24 | +### Title format |
| 25 | +PR titles must follow: |
| 26 | + |
| 27 | +type(scope): short summary |
| 28 | + |
| 29 | +Where: |
| 30 | +- `type` ∈ `feat | fix | docs | chore | refactor | test | perf | ci | build` |
| 31 | +- `scope` is optional |
| 32 | +- use lowercase, no trailing period |
| 33 | + |
| 34 | +Examples: |
| 35 | +- `fix: prevent panic on empty slot` |
| 36 | +- `feat(rpc): add account snapshot endpoint` |
| 37 | + |
| 38 | +The PR title becomes the commit title when merged. |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +### Compatibility & Safety |
| 43 | + |
| 44 | +Explicitly call out any of the following in the PR description: |
| 45 | +- config changes |
| 46 | +- migrations (disk, state, network, protocol) |
| 47 | +- behavior changes affecting operators |
| 48 | + |
| 49 | +If none apply, mark the change as **non-breaking**. |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +### Testing |
| 54 | + |
| 55 | +- Changes affecting correctness, consensus, or state handling **must** be tested. |
| 56 | +- Small refactors may rely on existing coverage; explain why if no new tests are added. |
| 57 | +- Performance-sensitive changes should include rationale or benchmarks where relevant. |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## Commits |
| 62 | + |
| 63 | +- Keep commits focused. |
| 64 | +- Avoid drive-by formatting or unrelated cleanups. |
| 65 | +- Squash merges are used; intermediate commit messages are not critical. |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## Code Style |
| 70 | + |
| 71 | +- Follow existing patterns. |
| 72 | +- Prefer explicitness over cleverness. |
| 73 | +- Avoid macros or unsafe code unless there is a clear, documented need. |
| 74 | +- Performance optimizations should be obvious and justified. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Configs & Interfaces |
| 79 | + |
| 80 | +Assume that: |
| 81 | +- config files |
| 82 | +- CLI flags |
| 83 | +- RPC / API surfaces |
| 84 | +- on-disk formats |
| 85 | + |
| 86 | +are relied upon by external operators. |
| 87 | + |
| 88 | +Changes here require: |
| 89 | +- documentation updates |
| 90 | +- compatibility notes in the PR |
| 91 | +- clear migration paths if breaking |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## Security |
| 96 | + |
| 97 | +If you believe you’ve found a security issue, **do not open a public issue**. |
| 98 | +Use the repository’s security policy instead. |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Questions & Ideas |
| 103 | + |
| 104 | +- Use **Issues** for concrete, actionable work. |
| 105 | +- Use **Discussions** for design questions, ideas, or uncertain proposals. |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +Thanks for helping keep the codebase fast, predictable, and boring in the best way. |
0 commit comments