Skip to content

feat(CCHAIN-908)!: Add ReceivedProposal host message for proposal-only mode#1110

Closed
romac wants to merge 10 commits intomainfrom
romac/recv-proposal-msg
Closed

feat(CCHAIN-908)!: Add ReceivedProposal host message for proposal-only mode#1110
romac wants to merge 10 commits intomainfrom
romac/recv-proposal-msg

Conversation

@romac
Copy link
Copy Markdown
Contributor

@romac romac commented Jun 26, 2025

Extracted from #1066

TODO

  • Testing
  • Update release notes
  • Update breaking changes

PR author checklist

For all contributors

For external contributors

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 26, 2025

Codecov Report

Attention: Patch coverage is 7.31707% with 38 lines in your changes missing coverage. Please review.

Project coverage is 76.84%. Comparing base (c16bd3e) to head (f0ce450).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1110      +/-   ##
==========================================
+ Coverage   76.49%   76.84%   +0.35%     
==========================================
  Files         164      164              
  Lines       17705    17730      +25     
  Branches    17705    17730      +25     
==========================================
+ Hits        13542    13623      +81     
+ Misses       3284     3215      -69     
- Partials      879      892      +13     
Flag Coverage Δ
integration 76.66% <7.32%> (+0.35%) ⬆️
mbt 7.77% <0.00%> (-<0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 86.15% <ø> (+0.26%) ⬆️
engine 73.13% <14.29%> (-0.36%) ⬇️
app 84.22% <0.00%> (-2.86%) ⬇️
starknet 73.56% <ø> (ø)

Comment thread code/crates/test/app/src/app.rs
Comment thread code/crates/test/app/src/app.rs Outdated
Comment thread code/examples/channel/src/app.rs Outdated
Comment thread code/examples/channel/src/app.rs Outdated
@romac romac force-pushed the romac/recv-proposal-msg branch from f0ce450 to be33136 Compare January 15, 2026 15:23
@romac romac marked this pull request as ready for review January 15, 2026 15:32
@romac romac requested a review from ancazamfir as a code owner January 15, 2026 15:32
@romac romac force-pushed the romac/recv-proposal-msg branch 2 times, most recently from a524ab2 to bb869a1 Compare January 15, 2026 15:54
@romac romac changed the title feat(code)!: Add ReceivedProposal host message for proposal-only mode feat(CCHAIN-908)!: Add ReceivedProposal host message for proposal-only mode Jan 16, 2026
Copy link
Copy Markdown
Contributor

@cason cason left a comment

Choose a reason for hiding this comment

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

Thanks for this, sounds good.

I don't know exactly how to test this.

If we are running in ProposalAndParts mode, the application is receiving the AppMsg::ReceivedProposal message. What is the real point of this? Do you want to enable the flow: receive Proposal, know what to get from the network, receive parts, reassemble parts, validate parts against Proposal, reply to consensus?

@romac romac force-pushed the romac/recv-proposal-msg branch from 2991b6e to 378a73a Compare January 29, 2026 13:01
Copy link
Copy Markdown
Contributor

@cason cason left a comment

Choose a reason for hiding this comment

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

I think that following ADR 003, we should not send this event to the application in the ProposalAndParts mode.

Also, we should empathise (more) that the reply to this message is the same value included in the Proposal plus, the most important, the its validity.

);
}

if state.params.value_payload.proposal_only() {
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.

The best part of it.

Comment thread code/crates/engine/src/host.rs Outdated
reply_to.send(rx.await?)?;
}

// Received a Proposal message in proposal-and-parts mode
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.

If we want to follow the ADR, we should not sent anything to the application in this case.

ancazamfir and others added 10 commits March 10, 2026 18:48
Note that in that case we should not receive a Proposal message ever
In ProposalAndParts mode, the host is merely notified of received
proposals and does not need to reply. Using call_and_forward created
an RPC reply port that would never receive a response, causing it
to leak. Use cast (fire-and-forget) instead.

Extract the proposal forwarding logic into a dedicated
forward_proposal_to_host helper method on the Consensus actor.

Also update BREAKING_CHANGES.md and ADR-003 to reflect that
ProposalOnly mode is now fully supported.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romac romac force-pushed the romac/recv-proposal-msg branch from 5a83f38 to 7e74560 Compare March 11, 2026 10:46
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Unsigned Commits Detected

The following commits are missing a verified signature:

  • 10509dd by Anca Zamfir
  • 14a8ee6 by romac
  • 50eac0c by romac
  • c664cff by romac
  • 49f650d by romac
  • 4b30233 by romac
  • 0816f76 by romac
  • 70d9149 by Romain Ruetschi
  • 00c88dc by Romain Ruetschi
  • 7e74560 by Romain Ruetschi

How to fix: Sign your commits.

@romac
Copy link
Copy Markdown
Contributor Author

romac commented Mar 13, 2026

Development of this PR has moved to a different repository.

@romac romac closed this Mar 13, 2026
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