Skip to content

Commit

Permalink
v sync (#191)
Browse files Browse the repository at this point in the history
* move scheduler for iterator into final inst var of iterator

* create compact from existing context, adapt pred/succ testing to CompactContext

* extract Tracked, start read only context work

* extract BaseContext

* static/dynamic context refactoring phase 1

* static/dynamic context refactoring phase 2

* cleanup

* move to context package

* move to context package. working memberships testint

* copyright

* remove Ring access from Context

* consolidate.  add tests for static context.

* Mirror tests for StaticContext passing

* pull up

* dynamic -> static conversion

* remove CompactContext

* adapt builder

* moar refactoring. implement missed methods on StaticContext. Add new view change notification using StaticContext. Add pendingView to CHOAM in prep for virtual sync

* move to inner

* fix StaticContext.isMember. Use StaticContext for CHOAM Committee views

* moar fixes to StaticContext to match existing contracts. Replace all the CHOAM Context use with StaticContext

* clean up PendingView logic.  Partial view synchronization implementation

* delegate next view logic to the current Committee

* reconfiguration logic uses pending view for virtual view synchrony

* number o' epochs

* allow unbounded number of epochs

* allow unbounded number of epochs

* Complete Ethereal controller upon view assembly.  Complete Driven context upon entering the Complete state.

* no reuse of forks. handle new epochs after produce.

* reuse forks

* 4 epochs

* do not reuse forks

* remove old style view change listener

* refactor fernet token handling

* better logging, fix npe's

* Advance pending view on Assembly block. Virtually synchronize RBC context in Domain.

Some minor, but important fixin's revealed during POC uptake testing

* separate configuration for genesis gen. use supplier for diadem check in assembly

* squelch

* update mvnw

* java 22

* java 22

* revert

* enforcer

* java 22

* mtls virtual thread exec

* minor cleanup

* minor logging

* whole lotta stabilizing, clarifying, etc

* interim.

too many sins and saints to count

* interim.

a few more sins and saints to count

* interim.

serialize tests until I figure out the lifecycle lossage causing hangs in parallel testing

* clarify

* clarify

* genesis/reassembly unblocking. use phaser instead of countdownlatch

* disable build parallelism

* restore build parallelism. cleanup. do not restore on genii

* optimize gather, parallelism

* amp up logging for these 2 problem children

* prevent view replay on ViewMember in GenesisAssembly and ViewAssembly.

Remove second thread from CI build - just 4 forks of testing now

* use Client as committee if fail quorum check. better logging.

If quorum too small for consensus, default to client.

2 threads, 4 forks

* just 4 forks

* anchor only if cardinality >= majority. correct use of whenComplete for critical completable futures. clear observations

* some cleanup.  don't fail but complete on view assembly

* enough with the forks

* amp logging

* perhaps...
  • Loading branch information
Hellblazer authored Apr 12, 2024
1 parent 46d4d83 commit 58552cb
Show file tree
Hide file tree
Showing 142 changed files with 6,659 additions and 4,147 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: graalvm
java-version: '22'
distribution: 'graalvm'
cache: 'maven'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Maven
run: ./mvnw -T 0.5C -batch-mode clean install -Ppre --file pom.xml -Dforks=2
run: ./mvnw -batch-mode clean install -Ppre --file pom.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
**/dependency-reduced-pom.xml
pom.xml.bak
/ff.log
chkpoint.txt

## Intellij stuff
.idea
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ and mechanisms of Apollo can be used for coins/etc, the design goals are much di
## Some Features

* Multi tenant isolation enclaves using GraalVM Isolates
* Self-contained cryptography module — Self describing Digests, Signatures and Identifiers, solid Bloom Filters, windows, etc
* Decentralized Identifier based foundation and key management infrastructure, based on
* Self-contained cryptography module — Self describing Digests, Signatures and Identifiers, solid Bloom Filters,
windows, etc
* Decentralized Identifier-based foundation and key management infrastructure, based on
the [Key Event Receipt Infrastructure](https://github.com/decentralized-identity/keri) (KERI)
* Secure and trusted attestation, identity bootstrapping and secrets provisioning
* MTLS network communication — KERI for MTLS certificate authentication. Local communication simulation for simplified
Expand All @@ -47,9 +48,10 @@ Apollo requires JDK 22+ and [Maven](https://maven.apache.org/) 3.9.3 and above

### Install Maven

The build includes _mvnw_, and thus there is not need to install Maven. Simply use ./mvnw for all your Maven invocation needs.
The build includes _mvnw_, and thus there is not need to install Maven. Simply use ./mvnw for all your Maven invocation
needs.

See [Installing Apache Maven](https://maven.apache.org/install.html) if you prefer to install Maven.
See [Installing Apache Maven](https://maven.apache.org/install.html) if you prefer to install Maven.

### Install GraalVM (Optional)

Expand All @@ -64,17 +66,18 @@ If you are building Apollo for the first time, you __must__ cd to the root dir

./mvnw clean install -Ppre -DskipTests

This will perform a full build, including the deterministic SQL execution module. After this is complete, you do not
need to do this again. You can build Apollo normally, without the deterministic SQL module and to do so cd to the root
This will perform a full build including the deterministic SQL execution module. After this is complete, you do not
need to do this again. You can build Apollo normally without the deterministic SQL module and to do so cd to the root
directory of the repository and then:

./mvnw clean install

Note that the _install_ maven goal is **required**, as this installs the modules in your local repository for use by
dependent modules within the rest of the build. You must have invoked maven on the Apollo project root with the "
install" goal at least once, to correctly build any arbitrary submodule.
install"
goal at least once, to correctly build any arbitrary submodule.

You can, of course, use the "--also-make-dependents" argument for maven "-amd" if you want to build a particular module
You can use the "--also-make-dependents" argument for maven "-amd" if you want to build a particular module
without performing the full build.

### Building Apollo Isolate Enclaves
Expand Down
59 changes: 59 additions & 0 deletions VAT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Internal Error occurred.
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'com.salesforce.apollo.choam.ViewAssemblyTest', classLoader = null] resolution failed
at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:103)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:46)
at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
... 13 more
Caused by: org.junit.platform.commons.PreconditionViolationException: Could not load class with name: com.salesforce.apollo.choam.ViewAssemblyTest
at org.junit.platform.engine.discovery.ClassSelector.lambda$getJavaClass$0(ClassSelector.java:95)
at org.junit.platform.commons.function.Try$Failure.getOrThrow(Try.java:335)
at org.junit.platform.engine.discovery.ClassSelector.getJavaClass(ClassSelector.java:94)
at org.junit.jupiter.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:66)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:135)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:212)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1686)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:144)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:574)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:560)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:546)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:662)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:189)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:126)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:92)
... 18 more
Caused by: java.lang.ClassNotFoundException: com.salesforce.apollo.choam.ViewAssemblyTest
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:529)
at java.base/java.lang.Class.forName(Class.java:508)
at org.junit.platform.commons.util.ReflectionUtils.lambda$tryToLoadClass$9(ReflectionUtils.java:832)
at org.junit.platform.commons.function.Try.lambda$call$0(Try.java:57)
at org.junit.platform.commons.function.Try.of(Try.java:93)
at org.junit.platform.commons.function.Try.call(Try.java:57)
at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:795)
at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:751)
at org.junit.platform.engine.discovery.ClassSelector.getJavaClass(ClassSelector.java:92)
... 32 more
5 changes: 3 additions & 2 deletions choam/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.salesforce.apollo</groupId>
Expand Down Expand Up @@ -52,4 +53,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
Loading

0 comments on commit 58552cb

Please sign in to comment.