-
Notifications
You must be signed in to change notification settings - Fork 1
audit: add module #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a comprehensive audit module (v1) for tracking and enforcing supernode compliance through deterministic window-based reporting and peer reachability observations. The module implements sophisticated evidence aggregation, quorum-based consensus, and automatic postponement of non-compliant supernodes.
Changes:
- Adds complete audit module infrastructure with keeper, types, and message handlers
- Implements deterministic window-based peer assignment and observation tracking
- Provides gRPC/REST query and transaction services with AutoCLI support
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| x/audit/v1/types/*.pb.go | Protocol buffer generated code for messages, queries, and types |
| x/audit/v1/types/*.go | Core type definitions, parameter validation, error codes, and codec registration |
| x/audit/v1/keeper/*.go | Keeper implementation with state management, window logic, and ABCI hooks |
| x/audit/v1/module/*.go | Module registration, genesis handling, dependency injection, and CLI configuration |
| proto/lumera/audit/v1/*.proto | Protocol buffer definitions for the audit module API |
| x/audit/v1/README.md | Comprehensive module documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var elementCount int | ||
| if elementCount != 0 && len(m.InboundPortStates) == 0 { | ||
| m.InboundPortStates = make([]PortState, 0, elementCount) | ||
| } |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This expression compares an expression to itself.
| var elementCount int | |
| if elementCount != 0 && len(m.InboundPortStates) == 0 { | |
| m.InboundPortStates = make([]PortState, 0, elementCount) | |
| } |
| if postIndex > l { | ||
| return io.ErrUnexpectedEOF | ||
| } | ||
| var elementCount int |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This expression compares an expression to itself.
| var elementCount int | |
| var elementCount int | |
| // First pass: count packed elements to preallocate slice capacity. | |
| for idx := iNdEx; idx < postIndex; { | |
| var v uint64 | |
| for shift := uint(0); ; shift += 7 { | |
| if shift >= 64 { | |
| return ErrIntOverflowAudit | |
| } | |
| if idx >= l { | |
| return io.ErrUnexpectedEOF | |
| } | |
| b := dAtA[idx] | |
| idx++ | |
| v |= uint64(b&0x7F) << shift | |
| if b < 0x80 { | |
| break | |
| } | |
| } | |
| elementCount++ | |
| } |
| if postIndex > l { | ||
| return io.ErrUnexpectedEOF | ||
| } | ||
| var elementCount int |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This expression compares an expression to itself.
| var elementCount int | |
| elementCount := 0 | |
| for idx := iNdEx; idx < postIndex; idx++ { | |
| if dAtA[idx] < 0x80 { | |
| elementCount++ | |
| } | |
| } |
No description provided.