Skip to content

[WIP] feat: JAM-NP CE Handler#616

Open
nu1lspaxe wants to merge 1649 commits into567-feat-nodefrom
feat/jam-np-ce-handler
Open

[WIP] feat: JAM-NP CE Handler#616
nu1lspaxe wants to merge 1649 commits into567-feat-nodefrom
feat/jam-np-ce-handler

Conversation

@nu1lspaxe
Copy link
Contributor

@nu1lspaxe nu1lspaxe commented Jul 28, 2025

Only focus on internal/networking/handler/ce, other files are auto included.

halfLotteryPeriod := lotteryPeriod / 2

// start forwarding after half-way through the Safrole lottery period.
forwardingSlots := halfLotteryPeriod - delaySlots
Copy link
Contributor

@yu2C yu2C Oct 5, 2025

Choose a reason for hiding this comment

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

Forwarding should be delayed until max(⌊E/20⌋,1) slots after the application of connectivity changes.

Evenly forwarding tickets from max(⌊E/20⌋,1) to halfLotteryPeriod.

And how to evenly forwarding tickets? Mayber we can discuss after this change.

1. remainingSlots should start from SlotSubmissionEnd.
2. proxy validator forwarding to more than one validators, so appends
   batch size computing.
@YCC3741 YCC3741 requested a review from weigen393 October 18, 2025 13:46
@YCC3741
Copy link
Contributor

YCC3741 commented Oct 19, 2025

@nu1lspaxe plz check 86dd548, which should have solved the merckle process issue, and see whether you can start working on ce129.

Copy link
Contributor

@yu2C yu2C left a comment

Choose a reason for hiding this comment

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

Small mistake in signature verification in audit part.

if tranche == 0 {
// Build ring from posterior validators
s := store.GetInstance()
gamma := s.GetPosteriorStates().GetGammaK()
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought we should use priorState instead of posteriorState to find the signer by index of validator set, cause in the networking, auditor only has block and priorState information.

image

And the formula in GP also use priorState
GP (17.3) 17.14

NOTE: The implementation of audit section might be outdated.

ctx := []byte{}
msg := annBytes

verified := false
Copy link
Contributor

Choose a reason for hiding this comment

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

This is temporary way for VRF verification...
In the real case, we might know the auditor index $v$ and get their publicKey by validator set.

return fmt.Errorf("empty gamma for verifier")
}

ring := []byte{}
Copy link
Contributor

Choose a reason for hiding this comment

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

For both $s(0)$ and $s(w)$, they're VRF signature instead of RingVRF.
In our implementation, you can simply set ring size = 1. see

@YCC3741 YCC3741 assigned Terryhung and unassigned nu1lspaxe Feb 1, 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.

9 participants