Skip to content

Commit

Permalink
entropy (#207)
Browse files Browse the repository at this point in the history
* Saner resource management. Don't set exec on clients.

* don't share forks. Use UE for model domain testing.

* remove

* logging, fpr adjus

* Clean and Smooth Join by requiring bft majorities before publish, etc.

Clean up pending/etc logic as well.

* will it blend?

* cleaner committee join, revert ReliableBroadcaster fpr changes

The bloom window needs a very low FPR

* Believe the view Reconfiguration is now fixed.

Significant work on join protocol.  Added new Chillin' state to ensure we get full membership through slow joiners.

* flew too close to the sun

* use UE

:: sigh ::

* use UE

* another attempt

* yet again

* ChurnTest

* ahem no

* don't reuse forks

* global platform threads

* no globals

* lighter weight

* test opti. reuse forks 🤞

Use UE with cached thread pools. tweak gossip durations, some epoch lengths, etc.

* don't reuse forks

* mtls uses plat cached threads by default
  • Loading branch information
Hellblazer authored Jun 7, 2024
1 parent 04c6275 commit 76ac944
Show file tree
Hide file tree
Showing 59 changed files with 737 additions and 495 deletions.
249 changes: 149 additions & 100 deletions choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java

Large diffs are not rendered by default.

28 changes: 12 additions & 16 deletions choam/src/main/java/com/salesforce/apollo/choam/Producer.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public boolean complete() {
}

public void join(SignedViewMember viewMember) {
assembly.join(viewMember, true);
assembly.joined(viewMember);
}

public void start() {
Expand Down Expand Up @@ -234,7 +234,7 @@ private Parameters params() {

private void processAssemblies(List<UnitData> aggregate) {
var aggs = aggregate.stream().flatMap(e -> e.getAssembliesList().stream()).toList();
log.trace("Consuming {} assemblies from {} units on: {}", aggs.size(), aggregate.size(),
log.trace("Consuming: {} assemblies from: {} units on: {}", aggs.size(), aggregate.size(),
params().member().getId());
assembly.assemble(aggs);
}
Expand Down Expand Up @@ -313,14 +313,14 @@ private void publish(PendingBlock p) {
}

private void publish(PendingBlock p, boolean beacon) {
assert p.witnesses.size() >= params().majority() : "Publishing non majority block";
assert p.witnesses.size() >= params().majority() : "Attempt to publish non majority block";
var publish = p.published.compareAndSet(false, true);
if (!publish && !beacon) {
log.trace("Already published: {} hash: {} height: {} witnesses: {} on: {}", p.block.block.getBodyCase(),
p.block.hash, p.block.height(), p.witnesses.values().size(), params().member().getId());
return;
}
log.trace("Publishing {}pending: {} hash: {} height: {} witnesses: {} on: {}", beacon ? "(beacon) " : "",
log.trace("Publishing {}: {} hash: {} height: {} witnesses: {} on: {}", beacon ? "(beacon) " : "(pending)",
p.block.block.getBodyCase(), p.block.hash, p.block.height(), p.witnesses.values().size(),
params().member().getId());
final var cb = CertifiedBlock.newBuilder()
Expand Down Expand Up @@ -357,21 +357,22 @@ private void reconfigure() {
}

private void serial(List<ByteString> preblock, Boolean last) {
try {
serialize.acquire();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return;
}
Thread.ofVirtual().start(() -> {
try {
serialize.acquire();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return;
}
try {
transitions.create(preblock, last);
create(preblock, last);
} catch (Throwable t) {
log.error("Error processing preblock last: {} on: {}", last, params().member().getId(), t);
} finally {
serialize.release();
}
});

}

private PendingBlock validate(Validate v) {
Expand Down Expand Up @@ -436,11 +437,6 @@ public void complete() {
stop();
}

@Override
public void create(List<ByteString> preblock, boolean last) {
Producer.this.create(preblock, last);
}

@Override
public void fail() {
stop();
Expand Down
Loading

0 comments on commit 76ac944

Please sign in to comment.