Skip to content

feat/simulation readme#352

Merged
stevana merged 8 commits into
mainfrom
stevan/sim-readme
Jul 30, 2025
Merged

feat/simulation readme#352
stevana merged 8 commits into
mainfrom
stevan/sim-readme

Conversation

@stevana

@stevana stevana commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added an option to disable test case shrinking during simulation runs via a command-line flag and environment variable.
    • Enhanced control over test parameters through additional environment variable support.
  • Documentation

    • Significantly expanded and reformatted the simulator's README with clearer usage instructions, detailed explanations of debugging output, and improved organization.
  • Style

    • Improved formatting of error messages for better readability during simulation failures.

stevana added 7 commits July 14, 2025 14:06
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
Document all parameters in the read me.

Signed-off-by: Stevan A <stevana@users.noreply.github.com>
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update introduces a new disable_shrinking flag to the Amaru Simulator, allowing users to control whether failing test cases are minimized (shrunk) during simulation runs. The flag is threaded through the CLI, configuration, and test harness, with documentation updated to explain its usage. Output formatting for failures is also improved.

Changes

Cohort / File(s) Change Summary
Documentation Update
simulation/amaru-sim/README.md
Expanded and reformatted README: added an overview, detailed usage with new environment variables (including shrinking control), a new debugging section, and improved formatting. No code or logic changes—just a doco glow-up, mate.
Simulator CLI & Error Formatting
simulation/amaru-sim/src/simulator/mod.rs
Added disable_shrinking boolean flag to CLI args and passed it into simulation config. Improved error message formatting in chain_property for readability.
Simulation Logic & Shrinking Control
simulation/amaru-sim/src/simulator/simulate.rs
Added disable_shrinking field to SimulateConfig. Updated simulation flow: if shrinking is disabled, skips shrinking and reports failure immediately; otherwise, continues with shrinking. Tweaked failure output formatting. Updated test configs for new field.
Test Harness & Env Vars
simulation/amaru-sim/tests/simulation.rs
Test config now reads parameters (number of tests, nodes, peers, disable_shrinking, persist_on_success) from environment variables, with improved parsing and explicit "1" checks for boolean flags. Defaults provided if env vars are missing.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant Simulator
    participant Shrinker

    User->>CLI: Run simulation with --disable_shrinking flag
    CLI->>Simulator: Pass disable_shrinking to SimulateConfig
    Simulator->>Simulator: Execute test on generated entries
    alt Test fails
        Simulator->>Simulator: Check disable_shrinking
        alt Shrinking disabled
            Simulator->>Simulator: Display failure (no shrinking)
        else Shrinking enabled
            Simulator->>Shrinker: Shrink failing input
            Shrinker-->>Simulator: Return minimized input
            Simulator->>Simulator: Display failure with shrunk input
        end
    else Test passes
        Simulator->>Simulator: Continue to next test
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Add shrinking a la delta debugging #345: The main PR adds a disable_shrinking flag and related control flow to optionally skip the shrinking process introduced in the retrieved PR, which implements the delta debugging shrinking algorithm; thus, the main PR directly builds upon and modifies the shrinking behavior added in the retrieved PR.
  • Initial version of Rust simulator #210: The main PR enhances the Amaru Simulator with a new disable_shrinking flag controlling test shrinking behavior and updates related test and CLI code, while the retrieved PR introduces the initial Rust simulator implementation including the simulate module and core simulation logic; since the main PR builds upon and modifies the simulate module introduced in the retrieved PR, their changes are directly related at the code level.
  • feat: basic amaru consensus simulator #140: The main PR focuses on enhancing and extending the Amaru Simulator's documentation and adding a disable shrinking flag in the simulator code, while the retrieved PR introduces the initial basic amaru consensus simulator executable; since the main PR changes do not modify or extend the initial simulator executable code introduced in the retrieved PR but rather improve documentation and add a new flag, the changes are related as they both concern the amaru-sim simulator but do not overlap on the same code elements or functionality directly.

Suggested reviewers

  • rkuhn
  • abailly

Poem

🍀
The shrinker’s off, let failures roar,
No more shrinking—just the raw score!
With env vars set and docs anew,
Debugging’s now a doddle, too.
So grab your flat white, don your specs,
This sim’s as clear as a cyberdeck!
🚀

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch stevan/sim-readme

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
simulation/amaru-sim/README.md (2)

40-50: Environment variables documentation is ace

The usage section now clearly documents all the environment variables with their defaults. It's like having a proper game manual instead of just button-mashing until something works!

However, the static analysis tool has a point about the code block language specifier.

-```
+```bash
 AMARU_NUMBER_OF_TESTS=50             # Set the number of test cases to generate. \
 AMARU_NUMBER_OF_NODES=1              # Set the number of nodes in a simulation. \
 AMARU_NUMBER_OF_UPSTREAM_PEERS=2     # Set the number of upstream peers.

52-101: Debugging section is absolutely brilliant! 🎮

This new debugging section is like having a strategy guide for when things go pear-shaped. The detailed breakdown of failure output components - minimized input, history, error message, saved schedule, and seed - is incredibly valuable for developers. It's like having a debug console in a video game that actually tells you useful stuff!

The example output makes it crystal clear what each part means and how to use it.

One tiny improvement for the static analysis tool:

-```
+```text
  Minimised input (0 shrinks):
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8cc6d30 and 436e531.

📒 Files selected for processing (4)
  • simulation/amaru-sim/README.md (1 hunks)
  • simulation/amaru-sim/src/simulator/mod.rs (4 hunks)
  • simulation/amaru-sim/src/simulator/simulate.rs (5 hunks)
  • simulation/amaru-sim/tests/simulation.rs (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: stevana
PR: pragma-org/amaru#210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in `simulation/amaru-sim/src/simulator/simulate.rs` with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (`../../target/debug/echo`) and making tests more reliable.
simulation/amaru-sim/README.md (5)

Learnt from: stevana
PR: #210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in simulation/amaru-sim/src/simulator/simulate.rs with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (../../target/debug/echo) and making tests more reliable.

Learnt from: abailly
PR: #250
File: simulation/amaru-sim/tests/data/stake-distribution.json:2-18
Timestamp: 2025-06-13T09:06:16.025Z
Learning: The file simulation/amaru-sim/tests/data/stake-distribution.json contains fully generated, non-sensitive private key values used solely for testing; they are considered safe to keep in the repository despite resembling real secrets.

Learnt from: abailly
PR: #228
File: crates/amaru-stores/src/rocksdb/consensus.rs:89-128
Timestamp: 2025-05-21T18:58:48.631Z
Learning: The InMemConsensusStore implementation in crates/amaru-stores/src/rocksdb/consensus.rs will be fleshed out incrementally on a by-need basis, driven by test requirements rather than implementing all functionality upfront.

Learnt from: rkuhn
PR: #206
File: crates/pure-stage/src/simulation/running.rs:240-242
Timestamp: 2025-05-09T13:09:47.915Z
Learning: Cloning messages in the pure-stage crate should be avoided for performance reasons. The current implementation in SimulationRunning deliberately avoids duplicating message data structures.

Learnt from: abailly
PR: #75
File: crates/amaru/src/consensus/mod.rs:164-165
Timestamp: 2025-02-03T11:15:22.640Z
Learning: In the Amaru project, chain selection operations (roll_forward and rollback) should use separate result types to leverage the type system for preventing impossible states, rather than using runtime checks or panics.

simulation/amaru-sim/tests/simulation.rs (5)

Learnt from: stevana
PR: #210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in simulation/amaru-sim/src/simulator/simulate.rs with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (../../target/debug/echo) and making tests more reliable.

Learnt from: abailly
PR: #250
File: simulation/amaru-sim/tests/data/stake-distribution.json:2-18
Timestamp: 2025-06-13T09:06:16.025Z
Learning: The file simulation/amaru-sim/tests/data/stake-distribution.json contains fully generated, non-sensitive private key values used solely for testing; they are considered safe to keep in the repository despite resembling real secrets.

Learnt from: rkuhn
PR: #149
File: crates/amaru/src/stages/consensus/chain_forward/test_infra.rs:0-0
Timestamp: 2025-04-20T17:56:39.223Z
Learning: For mpsc::channel in Tokio-based test code, use buffer sizes larger than 1 (e.g., 8) to avoid potential deadlocks when producers send multiple messages before consumers can process them.

Learnt from: abailly
PR: #228
File: crates/amaru-stores/src/rocksdb/consensus.rs:89-128
Timestamp: 2025-05-21T18:58:48.631Z
Learning: The InMemConsensusStore implementation in crates/amaru-stores/src/rocksdb/consensus.rs will be fleshed out incrementally on a by-need basis, driven by test requirements rather than implementing all functionality upfront.

Learnt from: rkuhn
PR: #149
File: crates/amaru/src/stages/consensus/chain_forward/test_infra.rs:272-285
Timestamp: 2025-04-20T17:57:23.233Z
Learning: In test infrastructure code, rkuhn prefers explicit panics (using .unwrap() or similar) over returning Result types, as test failures should be immediate and obvious.

simulation/amaru-sim/src/simulator/mod.rs (3)

Learnt from: stevana
PR: #210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in simulation/amaru-sim/src/simulator/simulate.rs with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (../../target/debug/echo) and making tests more reliable.

Learnt from: rkuhn
PR: #149
File: crates/amaru/src/stages/consensus/chain_forward/test_infra.rs:0-0
Timestamp: 2025-04-20T17:56:39.223Z
Learning: For mpsc::channel in Tokio-based test code, use buffer sizes larger than 1 (e.g., 8) to avoid potential deadlocks when producers send multiple messages before consumers can process them.

Learnt from: jeluard
PR: #69
File: crates/amaru/src/ledger/state/diff_epoch_reg.rs:112-117
Timestamp: 2025-01-21T15:32:17.911Z
Learning: When suggesting code changes in Rust, always verify that the types align correctly, especially when dealing with references and Options. The Fold::Registered variant in diff_epoch_reg.rs expects a reference &'a V, so unwrapping an Option<&V> requires only a single .expect().

simulation/amaru-sim/src/simulator/simulate.rs (2)

Learnt from: stevana
PR: #210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in simulation/amaru-sim/src/simulator/simulate.rs with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (../../target/debug/echo) and making tests more reliable.

Learnt from: rkuhn
PR: #149
File: crates/amaru/src/stages/consensus/chain_forward/test_infra.rs:272-285
Timestamp: 2025-04-20T17:57:23.233Z
Learning: In test infrastructure code, rkuhn prefers explicit panics (using .unwrap() or similar) over returning Result types, as test failures should be immediate and obvious.

🪛 markdownlint-cli2 (0.17.2)
simulation/amaru-sim/README.md

40-40: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


56-56: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (12)
simulation/amaru-sim/src/simulator/mod.rs (4)

98-99: G'day mate! Clean CLI argument addition 🎮

The disable_shrinking boolean flag is properly defined using clap's derive API. Simple and effective - like choosing the right weapon in Dark Souls, sometimes you just need a straightforward approach!


358-358: Flag extraction looks spot on

Extracting the disable_shrinking value from the args is clean and follows the same pattern as the other config values. No worries here, cobber!


378-378: Threading the flag through to SimulateConfig

Perfect! The disable_shrinking flag is properly passed into the SimulateConfig struct, maintaining consistency with the rest of the configuration pattern. Like a well-orchestrated heist in Ocean's Eleven - every piece falls into place!


413-414: Nice touch on the error formatting, legend!

Adding proper indentation and newlines to the error message makes it much more readable when comparing expected vs actual chain tips. It's like the difference between reading subtitles in a Tarantino film versus having them all jumbled together - presentation matters!

simulation/amaru-sim/tests/simulation.rs (3)

15-26: Brilliant environment variable setup, mate! 🎬

Love how you've made the test parameters configurable via environment variables. The pattern is consistent across all three numeric parameters with proper parsing and sensible fallbacks. It's like having cheat codes for your favorite game - gives you the control when you need it!


27-27: disable_shrinking environment integration looks sweet

The AMARU_DISABLE_SHRINKING environment variable integration follows the same boolean pattern as persist_on_success. Checking for "1" is a solid approach that avoids ambiguity. Clean as a whistle!


31-31: persist_on_success env var update is consistent

Updated to use the same boolean environment variable pattern as the new disable_shrinking flag. Consistency is key, like having a matching outfit - everything just works better together!

simulation/amaru-sim/README.md (1)

17-31: Top-notch overview section, champion! 📚

This new Overview section is like a good movie trailer - gives you just enough info to understand what's what without spoiling the experience. Linking to the specific source files is particularly helpful for developers diving into the codebase.

simulation/amaru-sim/src/simulator/simulate.rs (4)

57-57: SimulateConfig struct updated perfectly

Adding the disable_shrinking boolean field to the config struct is clean and straightforward. Fits right in with the existing fields like it was always meant to be there!


293-320: Conditional shrinking logic is spot on, legend! 🎯

This is brilliant work! The conditional logic is crystal clear:

  • Extract the test function once (line 293)
  • Run the test and handle failures appropriately
  • If shrinking is disabled → immediately display failure with zero shrinks
  • If shrinking is enabled → perform shrinking then display

It's like having a difficulty setting in a game - sometimes you want the full challenge (shrinking enabled), sometimes you just want to see what broke (shrinking disabled). The implementation preserves existing behavior while adding the new option seamlessly.


363-363: Nice formatting touch in display_failure

Adding the newline after the saved schedule message improves readability. Small details like this make the difference between good and great user experience - like proper kerning in movie credits!


511-511: Test configurations updated consistently

Both test cases now include the disable_shrinking: false flag, maintaining backwards compatibility while supporting the new feature. Consistent as a good sequel - keeps what worked while adding new capabilities!

Also applies to: 582-582

@codecov

codecov Bot commented Jul 30, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.57576% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
simulation/amaru-sim/src/simulator/simulate.rs 58.62% 12 Missing ⚠️
simulation/amaru-sim/src/simulator/mod.rs 50.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
simulation/amaru-sim/src/simulator/mod.rs 61.29% <50.00%> (+0.05%) ⬆️
simulation/amaru-sim/src/simulator/simulate.rs 70.42% <58.62%> (-2.05%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stevana stevana requested review from abailly and rkuhn July 30, 2025 11:34

@abailly abailly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typos

Comment thread simulation/amaru-sim/README.md Outdated
Comment thread simulation/amaru-sim/README.md Outdated
Signed-off-by: Stevan A <stevana@users.noreply.github.com>
@stevana stevana merged commit ee00cbe into main Jul 30, 2025
11 of 12 checks passed
@stevana stevana deleted the stevan/sim-readme branch July 30, 2025 13:24

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
simulation/amaru-sim/README.md (3)

27-29: Trim the duplicated sentence in the third bullet

Lines 27-29 repeat themselves like a scratched vinyl – “property-based test and property that uses the simulator” shows up twice. Let’s bin the echo to keep the doc tight.

-* The property-based test and property that uses the simulator, defined in
-  [`src/simulator/mod.rs`](src/simulator/mod.rs);
-  and property that uses the simulator is defined;
+* The property-based test that drives the simulator, defined in
+  [`src/simulator/mod.rs`](src/simulator/mod.rs);

41-52: Add a language hint to the env-vars block

markdownlint is right – the code fence at Line 41 is missing a language tag.
Stick “bash” on it so editors and CI stop whingeing.

-```
+```bash
 AMARU_NUMBER_OF_TESTS=50             # Set the number of test cases to generate. \
 ...
 cargo test run_simulator

---

`57-86`: **Label the debug-output fence as plain text**

Same craic here: give the second fence a language to quiet MD040. “text” does the trick and won’t colour anything weird.

```diff
-```
+```text
 Minimised input (0 shrinks):
 ...
 Seed: 42

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 436e531cab1fb1643e676ae7c2c914d773dba8b1 and 0bf67a657032b0b1053218b480a27982ae98ae13.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `simulation/amaru-sim/README.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧠 Learnings (2)</summary>

<details>
<summary>📓 Common learnings</summary>

Learnt from: stevana
PR: #210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in simulation/amaru-sim/src/simulator/simulate.rs with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (../../target/debug/echo) and making tests more reliable.


</details>
<details>
<summary>simulation/amaru-sim/README.md (5)</summary>

Learnt from: stevana
PR: pragma-org/amaru#210
File: simulation/amaru-sim/src/simulator/simulate.rs:264-277
Timestamp: 2025-05-12T14:21:27.470Z
Learning: The team plans to replace the out-of-process test in `simulation/amaru-sim/src/simulator/simulate.rs` with an in-process NodeHandle implementation in the future, eliminating the need for hard-coded binary paths (`../../target/debug/echo`) and making tests more reliable.

Learnt from: abailly
PR: pragma-org/amaru#250
File: simulation/amaru-sim/tests/data/stake-distribution.json:2-18
Timestamp: 2025-06-13T09:06:16.025Z
Learning: The file `simulation/amaru-sim/tests/data/stake-distribution.json` contains fully generated, non-sensitive private key values used solely for testing; they are considered safe to keep in the repository despite resembling real secrets.

Learnt from: abailly
PR: pragma-org/amaru#228
File: crates/amaru-stores/src/rocksdb/consensus.rs:89-128
Timestamp: 2025-05-21T18:58:48.631Z
Learning: The InMemConsensusStore implementation in crates/amaru-stores/src/rocksdb/consensus.rs will be fleshed out incrementally on a by-need basis, driven by test requirements rather than implementing all functionality upfront.

Learnt from: abailly
PR: pragma-org/amaru#75
File: crates/amaru/src/consensus/mod.rs:164-165
Timestamp: 2025-02-03T11:15:22.640Z
Learning: In the Amaru project, chain selection operations (roll_forward and rollback) should use separate result types to leverage the type system for preventing impossible states, rather than using runtime checks or panics.

Learnt from: rkuhn
PR: pragma-org/amaru#206
File: crates/pure-stage/src/simulation/running.rs:240-242
Timestamp: 2025-05-09T13:09:47.915Z
Learning: Cloning messages in the pure-stage crate should be avoided for performance reasons. The current implementation in SimulationRunning deliberately avoids duplicating message data structures.

</details>

</details><details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>simulation/amaru-sim/README.md</summary>

41-41: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

57-57: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)</summary>

* GitHub Check: Snapshots (preprod, 1, 10.1.4)
* GitHub Check: Build on ubuntu-latest with target riscv32im-risc0-zkvm-elf
* GitHub Check: Build on windows-latest with target x86_64-pc-windows-msvc
* GitHub Check: Coverage

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@rkuhn rkuhn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too late for review: LGTM thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants