Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 2.74 KB

File metadata and controls

59 lines (47 loc) · 2.74 KB

Contributing to synapse

Thanks for your interest. A few ground rules before you start.

Original work only

synapse is inspired by Neo4j's architecture but is not a derivative of it. This project is Apache-2.0 OR MIT. Three adjacent graph projects are read for architectural shapes only — never vendored, pasted, ported, or header-translated:

  • Neo4j — GPLv3 (community edition).
  • Memgraph — BSL 1.1 plus an enterprise license on some files. Source-available, not OSI open source.
  • FalkorDB — SSPLv1.

We read these projects for shapes and ideas (slotted record stores, kernel Read/Write cursors, the Cypher surface, undo-log layouts, HNSW backends, concurrent index-creation patterns) and then write original Rust. Do not paste, port, or translate source from any of them into this repository. If you have looked at one of those sources recently and want to contribute the same module here, take a clean-room gap and write it from the rustdoc on the relevant module, not from memory of the file you just read. When in doubt, open an issue first.

If a PR is reviewed and the reviewer notices any code pattern that looks unusually close to one of those projects, disclose what you read and when. The fix is almost always a rewrite from the public docstrings on a clean day; the goal is to keep the license boundary unambiguous.

Workflow

  1. Skim the workspace and find the crate your change belongs to. The module-level rustdoc (//! block at the top of each .rs file) is the design documentation — read the relevant one end-to-end before you start. ARCHITECTURE.md has the map.
  2. For non-trivial changes, open an issue first describing the change and which phase / milestone it belongs to. Phases are sequential; work that skips ahead needs an explicit reason.
  3. Run scripts/dev.sh before pushing. CI runs the same four commands (fmt --check, check --all-features, clippy -D warnings, test --all-features) on stable and the workspace MSRV (1.85.0), and will reject anything that fails locally.
  4. Keep commits small and reversible. Prefer many small PRs over one large one. PR descriptions should say why, not just what — the diff is the what.

Tests

The transaction layer carries proptest, differential, stress, and concurrent-snapshot suites (crates/synapse-core/tests/). Any tx-touching change should land alongside an extension to the relevant suite, not just a unit test. The bar is: a malicious sequencer should not be able to break the invariants in crates/synapse-core/src/tx/mod.rs.

Licensing your contributions

By submitting a contribution, you agree it is licensed under Apache-2.0 OR MIT at the user's choice, matching the rest of the repository.