HotStuff And Pacemaker

이 페이지는 현재 sigilaris-node-jvm에 포함된 HotStuff runtime을 요약한다.

현재 Baseline

Runtime 경계

이 문서는 transport 문서와 의도적으로 분리돼 있다.

즉 현재 저장소는 HotStuff logic을 runtime-owned로 두고, transport는 adapter layer로 유지한다.

Application Proposal Input

Autonomous pacemaker proposal emission은 더 이상 synthetic empty block에만 묶여 있지 않다. Embedder는 in-memory runtime helper나 assembled bootstrap entrypoint에 HotStuffProposalInputRuntimeConfig를 넘길 수 있다. 설정된 HotStuffProposalInputProvider는 window, proposer, parent, height, justify QC, local time, proposal bounds 같은 HotStuff context만 받는다.

Provider는 Sigilaris가 서명할 수 있는 proposal tx-set과 block-header commitment를 담은 HotStuffProposalInput을 반환한다. Application-specific queue, lane, manifest, fairness rule은 sigilaris-node-jvm 밖에 남고, embedder가 해당 개념을 HotStuff-owned input contract로 변환한다.

Legacy empty proposal은 명시적인 AllowLegacyEmpty fallback policy로 유지된다. Application input을 요구하는 production embedder는 RequireProviderInput을 선택할 수 있다. 이 경우 automatic consensus는 provider가 없으면 눈에 띄게 실패하고, provider가 no work, rejection, failure를 보고하면 fallback을 suppress한다.

Provider no-work, rejection, failure, invalid input, fallback 동작은 pacemaker diagnostics에 reason/detail metadata와 fallbackUsed flag로 기록된다. Diagnostics는 application payload body를 의도적으로 포함하지 않는다. 예상 밖의 provider exception은 exception message가 아니라 exception class name만 detail로 기록된다.

Application Proposal Validation

Proposal validation은 proposal input과 별도 hook이다. Input provider는 local node가 leader이고 proposal body data가 필요할 때만 사용된다. Validation provider는 node가 received proposal에 대해 local vote를 서명하려는 시점에 사용된다.

Embedder는 HotStuffNodeRuntime 또는 assembled bootstrap entrypoint에 HotStuffProposalValidationRuntimeConfig를 넘길 수 있다. 설정된 HotStuffProposalValidationProvider는 proposal, local voter, validation time, validator set 같은 HotStuff context만 받는다. 반환값은 Accepted, Rejected, Unavailable, Failed다.

Rejected, unavailable, failed, missing-required validation은 local proposal vote를 절대 서명하지 않는다. legacyCompatible은 기존 allow-all 동작을 유지한다. Production embedder는 requireProvider(provider) 또는 requireValidationProvider를 선택할 수 있고, validation이 required인데 provider가 없으면 automatic consensus가 fail fast 한다.

Validation diagnostics는 pacemaker snapshot에 window, proposal id, block id, local voter, outcome, reason/detail, vote suppressed 여부로 기록된다. Proposal payload body는 포함하지 않는다. Structural artifact retention은 HotStuff sink에 남는다. 즉 structurally valid proposal은 local application validation이 vote를 suppress해도 retained 상태로 남을 수 있다.

현재 제한 사항

후속 작업

관련 페이지