Skip to content

Commit

Permalink
Fix mispelling of proto packages - d'oh
Browse files Browse the repository at this point in the history
Add leyden module, new proto services for such.
  • Loading branch information
Hellblazer committed Dec 10, 2023
1 parent f77db69 commit 4565621
Show file tree
Hide file tree
Showing 231 changed files with 3,222 additions and 2,806 deletions.
22 changes: 11 additions & 11 deletions choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.Message;
import com.salesfoce.apollo.choam.proto.*;
import com.salesfoce.apollo.choam.proto.SubmitResult.Result;
import com.salesfoce.apollo.cryptography.proto.PubKey;
import com.salesfoce.apollo.messaging.proto.AgedMessageOrBuilder;
import com.salesforce.apollo.choam.proto.*;
import com.salesforce.apollo.choam.proto.SubmitResult.Result;
import com.salesforce.apollo.cryptography.proto.PubKey;
import com.salesforce.apollo.messaging.proto.AgedMessageOrBuilder;
import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications;
import com.salesforce.apollo.bloomFilters.BloomFilter;
import com.salesforce.apollo.choam.comm.*;
Expand Down Expand Up @@ -75,9 +75,9 @@ public class CHOAM {
private final AtomicReference<HashedCertifiedBlock> genesis = new AtomicReference<>();
private final AtomicReference<HashedCertifiedBlock> head = new AtomicReference<>();
private final ExecutorService linear;
private final AtomicReference<nextView> next = new AtomicReference<>();
private final AtomicReference<Digest> nextViewId = new AtomicReference<>();
private final Parameters params;
private final AtomicReference<nextView> next = new AtomicReference<>();
private final AtomicReference<Digest> nextViewId = new AtomicReference<>();
private final Parameters params;
private final PriorityBlockingQueue<HashedCertifiedBlock> pending = new PriorityBlockingQueue<>();
private final RoundScheduler roundScheduler;
private final Session session;
Expand Down Expand Up @@ -587,6 +587,10 @@ private void genesisInitialization(final HashedBlock h, final List<Transaction>
}
}

private String getLabel() {
return "CHOAM" + params.member().getId() + params.context().getId();
}

private boolean isNext(HashedBlock next) {
if (next == null) {
return false;
Expand Down Expand Up @@ -938,10 +942,6 @@ private void synchronizedProcess(CertifiedBlock certifiedBlock) {
pending.add(hcb);
}

private String getLabel() {
return "CHOAM" + params.member().getId() + params.context().getId();
}

public interface BlockProducer {
Block checkpoint();

Expand Down
20 changes: 9 additions & 11 deletions choam/src/main/java/com/salesforce/apollo/choam/Committee.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

import org.slf4j.Logger;

import com.salesfoce.apollo.choam.proto.Certification;
import com.salesfoce.apollo.choam.proto.Reconfigure;
import com.salesfoce.apollo.choam.proto.SubmitResult;
import com.salesfoce.apollo.choam.proto.SubmitResult.Result;
import com.salesfoce.apollo.choam.proto.Transaction;
import com.salesfoce.apollo.choam.proto.ViewMember;
import com.salesforce.apollo.choam.proto.Certification;
import com.salesforce.apollo.choam.proto.Reconfigure;
import com.salesforce.apollo.choam.proto.SubmitResult;
import com.salesforce.apollo.choam.proto.SubmitResult.Result;
import com.salesforce.apollo.choam.proto.Transaction;
import com.salesforce.apollo.choam.proto.ViewMember;
import com.salesforce.apollo.choam.support.HashedCertifiedBlock;
import com.salesforce.apollo.cryptography.Digest;
import com.salesforce.apollo.cryptography.DigestAlgorithm;
Expand All @@ -33,21 +33,19 @@

/**
* @author hal.hildebrand
*
*/
public interface Committee {

static Map<Member, Verifier> validatorsOf(Reconfigure reconfigure, Context<Member> context) {
return reconfigure.getJoinsList()
.stream()
.collect(Collectors.toMap(e -> context.getMember(new Digest(e.getMember().getId())),
e -> new DefaultVerifier(publicKey(e.getMember()
.getConsensusKey()))));
e -> new DefaultVerifier(
publicKey(e.getMember().getConsensusKey()))));
}

/**
* Create a view based on the cut of the supplied hash across the rings of the
* base context
* Create a view based on the cut of the supplied hash across the rings of the base context
*/
static Context<Member> viewFor(Digest hash, Context<? super Member> baseContext) {
Context<Member> newView = new ContextImpl<>(hash, baseContext.getRingCount(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import com.chiralbehaviors.tron.Fsm;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import com.salesfoce.apollo.choam.proto.*;
import com.salesfoce.apollo.cryptography.proto.PubKey;
import com.salesforce.apollo.choam.proto.*;
import com.salesforce.apollo.cryptography.proto.PubKey;
import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications;
import com.salesforce.apollo.choam.comm.Terminal;
import com.salesforce.apollo.choam.fsm.Genesis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import java.util.Collections;

import com.salesfoce.apollo.choam.proto.Validate;
import com.salesforce.apollo.choam.proto.Validate;
import com.salesforce.apollo.choam.CHOAM.BlockProducer;
import com.salesforce.apollo.cryptography.Signer;
import com.salesforce.apollo.cryptography.Verifier;
Expand All @@ -17,7 +17,6 @@

/**
* @author hal.hildebrand
*
*/
public class GenesisContext extends ViewContext {

Expand Down
64 changes: 32 additions & 32 deletions choam/src/main/java/com/salesforce/apollo/choam/Parameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import com.netflix.concurrency.limits.limit.AIMDLimit;
import com.netflix.concurrency.limits.limiter.LifoBlockingLimiter;
import com.netflix.concurrency.limits.limiter.SimpleLimiter;
import com.salesfoce.apollo.choam.proto.FoundationSeal;
import com.salesfoce.apollo.choam.proto.Join;
import com.salesfoce.apollo.choam.proto.Transaction;
import com.salesfoce.apollo.stereotomy.event.proto.KERL_;
import com.salesforce.apollo.choam.proto.FoundationSeal;
import com.salesforce.apollo.choam.proto.Join;
import com.salesforce.apollo.choam.proto.Transaction;
import com.salesforce.apollo.stereotomy.event.proto.KERL_;
import com.salesforce.apollo.archipelago.Router;
import com.salesforce.apollo.choam.CHOAM.TransactionExecutor;
import com.salesforce.apollo.choam.support.CheckpointState;
Expand Down Expand Up @@ -60,32 +60,36 @@ public static Builder newBuilder() {
return new Builder();
}

public int majority() {
return runtime.context.majority();
public Function<ULong, File> checkpointer() {
return runtime.checkpointer;
}

public SigningMember member() {
return runtime.member;
public Router communications() {
return runtime.communications;
}

public Context<Member> context() {
return runtime.context;
}

public Router communications() {
return runtime.communications;
public Function<Map<Member, Join>, List<Transaction>> genesisData() {
return runtime.genesisData;
}

public ChoamMetrics metrics() {
return runtime.metrics;
public Supplier<KERL_> kerl() {
return runtime.kerl;
}

public Function<ULong, File> checkpointer() {
return runtime.checkpointer;
public int majority() {
return runtime.context.majority();
}

public Function<Map<Member, Join>, List<Transaction>> genesisData() {
return runtime.genesisData;
public SigningMember member() {
return runtime.member;
}

public ChoamMetrics metrics() {
return runtime.metrics;
}

public TransactionExecutor processor() {
Expand All @@ -96,10 +100,6 @@ public BiConsumer<HashedBlock, CheckpointState> restorer() {
return runtime.restorer;
}

public Supplier<KERL_> kerl() {
return runtime.kerl;
}

public static class MvStoreBuilder implements Cloneable {
private int autoCommitBufferSize = -1;
private int autoCompactFillRate = -1;
Expand Down Expand Up @@ -580,10 +580,6 @@ public Limiter<Void> build(String name, MetricRegistry metrics) {
.build();
}

public Duration getbacklogDuration() {
return backlogDuration;
}

public int getBacklogSize() {
return backlogSize;
}
Expand Down Expand Up @@ -638,6 +634,10 @@ public LimiterBuilder setTimeout(Duration timeout) {
return this;
}

public Duration getbacklogDuration() {
return backlogDuration;
}

public LimiterBuilder setBacklogDuration(Duration backlogDuration) {
this.backlogDuration = backlogDuration;
return this;
Expand Down Expand Up @@ -679,14 +679,6 @@ public static class Builder implements Cloneable {
private SignatureAlgorithm viewSigAlgorithm = SignatureAlgorithm.DEFAULT;
private int crowns = 2;

public int getCrowns() {
return crowns;
}

public void setCrowns(int crowns) {
this.crowns = crowns;
}

public Parameters build(RuntimeParameters runtime) {
return new Parameters(runtime, combine, gossipDuration, maxCheckpointSegments, submitTimeout, genesisViewId,
checkpointBlockDelta, crowns, digestAlgorithm, viewSigAlgorithm,
Expand Down Expand Up @@ -739,6 +731,14 @@ public Builder setCombine(ReliableBroadcaster.Parameters combine) {
return this;
}

public int getCrowns() {
return crowns;
}

public void setCrowns(int crowns) {
this.crowns = crowns;
}

public DigestAlgorithm getDigestAlgorithm() {
return digestAlgorithm;
}
Expand Down
Loading

0 comments on commit 4565621

Please sign in to comment.