Write proposer binary

This commit is contained in:
Bojan Serafimov
2022-04-20 23:00:43 -04:00
parent c8c76a8b99
commit a74ca297e1
6 changed files with 233 additions and 18 deletions

View File

@@ -1,3 +1,13 @@
from contextlib import closing
import pytest
from fixtures.zenith_fixtures import ZenithEnv, PgBin, ZenithEnvBuilder, DEFAULT_BRANCH_NAME, AdversarialProposerBin
from fixtures.benchmark_fixture import MetricReport, ZenithBenchmarker
# TODO PR execution plan:
# 1. Write an adversarial proposer that successfully sends greeting
# 1. Make pg connection
@@ -6,12 +16,17 @@
# 3. Add TODOs, merge the harness into main, improve later
def test_fuzz_safekeeper(zenith_env_builder: ZenithEnvBuilder):
def test_fuzz_safekeeper(zenith_env_builder: ZenithEnvBuilder,
adversarial_proposer_bin: AdversarialProposerBin):
zenith_env_builder.num_safekeepers = 3
env = zenith_env_builder.init_start()
env.zenith_cli.create_branch('test_fuzz_safekeeper')
pg = env.postgres.create_start('test_fuzz_safekeeper')
timeline = pg.safe_psql("SHOW zenith.zenith_timeline")[0][0]
output = adversarial_proposer_bin.say_hi(env.initial_tenant.hex, timeline)
print(output)
# TODO:
# 1. Start an adversarial proposer (new rust binary) that tries to take over