-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2936: [BFT Testing] Corrupting ingress traffic (part-3, process ingress message) r=gomisha a=gomisha This PR: - connects all the ingress traffic mechanism to the Corrupt Network, Attack Orchestrator, Orchestrator Network, Message Processor - updates and standardizes testing framework component names - does NOT cover adding new unit tests for ingress traffic - that will be done in the next PR (part 4). Details: - added `HandleIngressEvent()` to `insecure.AttackOrchestrator` interface - added `SendIngress()` to `orchestrator.OrchestratorNetwork` interface - updated implementation for `HandleIncomingEvent()` for `insecure.IngressController` to return `bool` depending on whether attacker is registered with the corrupted network - renamed `WithAttacker()` to `Register()` in `AttackOrchestrator` interface - updated dummy and Wintermute orchestrators to panic on ingress messages (needs implementation and testing that will be done in separate PR) - renamed `attacknetwork` package to `orchestrator` - renamed `attacknetwork.AttackNetwork` to `orchestrator.OrchestratorNetwork` which implements `insecure.OrchestratorNetwork` interface - changed all references from `attack network` / `attackNetwork` to `orchestrator network` / `orchestratorNetwork` - changed many (not all) references from `attacker` to `attack orchestrator` - changed many (not all) references from `corrupted` / `corruptible` to `corrupt` Co-authored-by: Yahya <yahya@dapperlabs.com> Co-authored-by: Yahya <yhassanzadeh13@ku.edu.tr>
- Loading branch information
Showing
42 changed files
with
946 additions
and
1,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package insecure | ||
|
||
// AttackOrchestrator represents the stateful interface that implements a certain type of attack, e.g., wintermute attack. | ||
type AttackOrchestrator interface { | ||
// HandleEgressEvent implements logic of processing the outgoing events received from a corrupted node. | ||
// Corrupted nodes relay all their outgoing events to the orchestrator instead of dispatching them to the network. | ||
// | ||
// Note: as a design assumption, this method is invoked sequentially by the OrchestratorNetwork to pass the | ||
// events of corrupted nodes. Hence, no extra concurrency-safe consideration is needed. | ||
HandleEgressEvent(*EgressEvent) error | ||
|
||
Register(OrchestratorNetwork) | ||
|
||
// HandleIngressEvent implements the logic of processing an incoming event to a corrupted node. | ||
// Note: as a design assumption, this method is invoked sequentially by the OrchestratorNetwork to pass the | ||
// events of corrupted nodes. Hence, no extra concurrency-safe consideration is needed. | ||
HandleIngressEvent(*IngressEvent) error | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.