Skip to content

Commit

Permalink
Merge branch 'master' into fxamacker/reduce-checkpoint-serialization-…
Browse files Browse the repository at this point in the history
…memory
  • Loading branch information
fxamacker authored Aug 23, 2022
2 parents d136a3e + 395422b commit 20f3022
Show file tree
Hide file tree
Showing 42 changed files with 946 additions and 1,010 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/flaky-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,26 @@ env:
GO_VERSION: 1.18

jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout repo
uses: actions/checkout@v2
- name: Run tests
if: github.actor != 'bors[bot]'
run: make ci
integration-test:
name: Integration Tests
strategy:
fail-fast: false
matrix:
test-category:
- integration-epochs
- integration-bft
env:
TEST_CATEGORY: ${{ matrix.test-category }}
runs-on: ubuntu-latest
Expand Down
17 changes: 0 additions & 17 deletions insecure/attackNetwork.go

This file was deleted.

13 changes: 0 additions & 13 deletions insecure/attackOrchestrator.go

This file was deleted.

18 changes: 18 additions & 0 deletions insecure/attack_orchestrator.go
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
}
79 changes: 41 additions & 38 deletions insecure/attacker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions insecure/attacker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,26 @@ message Message {
IngressMessage Ingress = 2;
}

// EgressMessage represents the message exchanged between the CorruptibleConduitFactory and Attacker services.
// EgressMessage represents an outgoing message from a corrupt node to another (honest or corrupt) node.
// The exchanged message is between the CorruptibleConduitFactory and Attacker services.
message EgressMessage {
string ChannelID = 1;
bytes OriginID = 2;

// CorruptOriginID represents the corrupt node id where the outgoing message is coming from.
bytes CorruptOriginID = 2;
uint32 TargetNum = 3;
repeated bytes TargetIDs = 4;
bytes Payload = 5;
Protocol protocol = 6;
}

// OriginID for IngressMessage represents the node id where the message is coming from - that node could be corrupted or honest.
// IngressMessage represents an incoming message from another node (honest or corrupt) to a corrupt node.
message IngressMessage {
string ChannelID = 1;

// OriginID represents the node id where the incoming message is coming from - that node could be corrupt or honest.
bytes OriginID = 2;
bytes TargetID = 3;
bytes CorruptTargetID = 3;
bytes Payload = 4;
}

Expand Down
Loading

0 comments on commit 20f3022

Please sign in to comment.