Skip to content

Expose crypto profile on ConsensusEngine and use it in vote/authentication context#312

Merged
aoxc merged 1 commit intomainfrom
codex/improve-unity-project-for-professional-use
Mar 24, 2026
Merged

Expose crypto profile on ConsensusEngine and use it in vote/authentication context#312
aoxc merged 1 commit intomainfrom
codex/improve-unity-project-for-professional-use

Conversation

@aoxc
Copy link
Owner

@aoxc aoxc commented Mar 24, 2026

Motivation

  • Make the consensus engine crypto-agile by surfacing a per-engine crypto/profile identifier so authentication contexts derive network_id and signature_scheme from engine configuration instead of hardcoded values.
  • Provide a public constructor to configure both network_id and signature_scheme at initialization time.
  • Document roadmap and recommendations around crypto-agility and related engine design decisions.

Description

  • Added a signature_scheme: u16 field to ConsensusEngine and threaded it through the engine state.
  • Introduced ConsensusEngine::with_crypto_profile(state, network_id, signature_scheme) and updated new and with_network_id to call it with a default scheme of 1.
  • Updated vote_authentication_context() to return network_id: self.network_id and signature_scheme: self.signature_scheme instead of hardcoded values.
  • Added a unit test custom_crypto_profile_is_used_for_execution_certificate_context that constructs an engine with a custom crypto profile and asserts emitted execution certificate fields network_id and signature_scheme match the configured values.
  • Extended the roadmap document docs/src/AOXCUNITY_ENGINE_ROADMAP_TR.md with sections on crypto-agility, evidence-first security, and recommended migration strategy (kept, not removed).

Testing

  • Ran the crate unit tests including the new test custom_crypto_profile_is_used_for_execution_certificate_context with cargo test and all tests passed.
  • Executed the consensus engine unit test suite covering certificate emission and finality and observed no regressions.

Codex Task

Repository owner deleted a comment from chatgpt-codex-connector bot Mar 24, 2026
@aoxc aoxc merged commit a8183bc into main Mar 24, 2026
2 of 3 checks passed
@aoxc aoxc deleted the codex/improve-unity-project-for-professional-use branch March 24, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant