Search in sources :

Example 1 with MainnetForksModule

use of com.radixdlt.statecomputer.forks.modules.MainnetForksModule in project radixdlt by radixdlt.

the class ApiTest method setup.

@Before
public void setup() {
    var injector = Guice.createInjector(MempoolConfig.asModule(mempoolMaxSize, 10), new MainnetForksModule(), new RadixEngineForksLatestOnlyModule(RERulesConfig.testingDefault().overrideFeeTable(FeeTable.create(Amount.ofSubunits(UInt256.ONE), Map.of(ValidatorRegisteredCopy.class, Amount.ofSubunits(UInt256.ONE))))), new ForksModule(), new SingleNodeAndPeersDeterministicNetworkModule(TEST_KEY, 1), new MockedGenesisModule(Set.of(TEST_KEY.getPublicKey()), totalTokenAmount, stakeAmount), new AbstractModule() {

        @Override
        protected void configure() {
            bind(BerkeleyRecoverableProcessedTxnStore.class).in(Scopes.SINGLETON);
            Multibinder.newSetBinder(binder(), BerkeleyAdditionalStore.class).addBinding().to(BerkeleyRecoverableProcessedTxnStore.class);
            bindConstant().annotatedWith(DatabaseLocation.class).to(folder.getRoot().getAbsolutePath());
            bindConstant().annotatedWith(NetworkId.class).to(99);
            bind(P2PConfig.class).toInstance(mock(P2PConfig.class));
            bind(AddressBook.class).in(Scopes.SINGLETON);
            var selfUri = RadixNodeUri.fromPubKeyAndAddress(99, TEST_KEY.getPublicKey(), "localhost", 23456);
            bind(RadixNodeUri.class).annotatedWith(Self.class).toInstance(selfUri);
            var addressBookPersistence = mock(AddressBookPersistence.class);
            when(addressBookPersistence.getAllEntries()).thenReturn(ImmutableList.of());
            bind(AddressBookPersistence.class).toInstance(addressBookPersistence);
            var runtimeProperties = mock(RuntimeProperties.class);
            when(runtimeProperties.get(eq("api.transactions.enable"), anyBoolean())).thenReturn(true);
            bind(RuntimeProperties.class).toInstance(runtimeProperties);
        }
    });
    injector.injectMembers(this);
}
Also used : SingleNodeAndPeersDeterministicNetworkModule(com.radixdlt.modules.SingleNodeAndPeersDeterministicNetworkModule) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) ForksModule(com.radixdlt.statecomputer.forks.ForksModule) AddressBookPersistence(com.radixdlt.network.p2p.addressbook.AddressBookPersistence) BerkeleyAdditionalStore(com.radixdlt.store.berkeley.BerkeleyAdditionalStore) RadixEngineForksLatestOnlyModule(com.radixdlt.statecomputer.forks.RadixEngineForksLatestOnlyModule) AbstractModule(com.google.inject.AbstractModule) BerkeleyRecoverableProcessedTxnStore(com.radixdlt.api.core.reconstruction.BerkeleyRecoverableProcessedTxnStore) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) MockedGenesisModule(com.radixdlt.statecomputer.checkpoint.MockedGenesisModule) RadixNodeUri(com.radixdlt.network.p2p.RadixNodeUri) RuntimeProperties(com.radixdlt.properties.RuntimeProperties) Before(org.junit.Before)

Example 2 with MainnetForksModule

use of com.radixdlt.statecomputer.forks.modules.MainnetForksModule in project radixdlt by radixdlt.

the class RadixEngineStateComputerTest method getExternalModule.

private Module getExternalModule() {
    return new AbstractModule() {

        @Override
        public void configure() {
            var validatorSet = BFTValidatorSet.from(registeredNodes.stream().map(ECKeyPair::getPublicKey).map(BFTNode::create).map(n -> BFTValidator.from(n, UInt256.ONE)));
            bind(ProposerElection.class).toInstance(new WeightedRotatingLeaders(validatorSet));
            bind(Serialization.class).toInstance(serialization);
            bind(Hasher.class).toInstance(Sha256Hasher.withDefaultSerialization());
            bind(new TypeLiteral<EngineStore<LedgerAndBFTProof>>() {
            }).toInstance(engineStore);
            bind(PersistentVertexStore.class).toInstance(mock(PersistentVertexStore.class));
            install(MempoolConfig.asModule(10, 10));
            install(new MainnetForksModule());
            install(new RadixEngineForksLatestOnlyModule());
            install(new ForksModule());
            // HACK
            bind(CommittedReader.class).toInstance(new NoOpCommittedReader());
            bind(ForksEpochStore.class).toInstance(new NoOpForksEpochStore());
            bind(LedgerAccumulator.class).to(SimpleLedgerAccumulatorAndVerifier.class);
            bind(new TypeLiteral<EventDispatcher<MempoolAddSuccess>>() {
            }).toInstance(TypedMocks.rmock(EventDispatcher.class));
            bind(new TypeLiteral<EventDispatcher<InvalidProposedTxn>>() {
            }).toInstance(TypedMocks.rmock(EventDispatcher.class));
            bind(new TypeLiteral<EventDispatcher<TxnsRemovedFromMempool>>() {
            }).toInstance(TypedMocks.rmock(EventDispatcher.class));
            bind(new TypeLiteral<EventDispatcher<REOutput>>() {
            }).toInstance(TypedMocks.rmock(EventDispatcher.class));
            bind(new TypeLiteral<EventDispatcher<MempoolRelayTrigger>>() {
            }).toInstance(TypedMocks.rmock(EventDispatcher.class));
            bind(new TypeLiteral<EventDispatcher<LedgerUpdate>>() {
            }).toInstance(TypedMocks.rmock(EventDispatcher.class));
            bind(SystemCounters.class).to(SystemCountersImpl.class);
        }
    };
}
Also used : Module(com.google.inject.Module) SimpleLedgerAccumulatorAndVerifier(com.radixdlt.ledger.SimpleLedgerAccumulatorAndVerifier) TxAction(com.radixdlt.atom.TxAction) NoOpCommittedReader(com.radixdlt.sync.NoOpCommittedReader) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) RadixEngineException(com.radixdlt.engine.RadixEngineException) RadixEngineForksLatestOnlyModule(com.radixdlt.statecomputer.forks.RadixEngineForksLatestOnlyModule) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Inject(com.google.inject.Inject) TypedMocks(com.radixdlt.utils.TypedMocks) DefaultSerialization(com.radixdlt.DefaultSerialization) Hasher(com.radixdlt.crypto.Hasher) MempoolAdd(com.radixdlt.mempool.MempoolAdd) RoundData(com.radixdlt.application.system.state.RoundData) QuorumCertificate(com.radixdlt.hotstuff.QuorumCertificate) LedgerHeader(com.radixdlt.hotstuff.LedgerHeader) ByzantineQuorumException(com.radixdlt.ledger.ByzantineQuorumException) CurrentForkView(com.radixdlt.statecomputer.forks.CurrentForkView) VerifiedTxnsAndProof(com.radixdlt.ledger.VerifiedTxnsAndProof) PersistentVertexStore(com.radixdlt.hotstuff.bft.PersistentVertexStore) HashUtils(com.radixdlt.crypto.HashUtils) Genesis(com.radixdlt.statecomputer.checkpoint.Genesis) SystemCounters(com.radixdlt.counters.SystemCounters) NoOpForksEpochStore(com.radixdlt.statecomputer.forks.NoOpForksEpochStore) REEvent(com.radixdlt.constraintmachine.REEvent) StateComputerResult(com.radixdlt.ledger.StateComputerLedger.StateComputerResult) VerifiedVertex(com.radixdlt.hotstuff.bft.VerifiedVertex) EngineStore(com.radixdlt.store.EngineStore) TimestampedECDSASignatures(com.radixdlt.hotstuff.TimestampedECDSASignatures) Collectors(java.util.stream.Collectors) ForksEpochStore(com.radixdlt.statecomputer.forks.ForksEpochStore) SystemCountersImpl(com.radixdlt.counters.SystemCountersImpl) List(java.util.List) Stream(java.util.stream.Stream) ConstraintMachineException(com.radixdlt.constraintmachine.exceptions.ConstraintMachineException) CommittedReader(com.radixdlt.sync.CommittedReader) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) Amount(com.radixdlt.application.tokens.Amount) TypeLiteral(com.google.inject.TypeLiteral) LedgerAccumulator(com.radixdlt.ledger.LedgerAccumulator) Mockito.mock(org.mockito.Mockito.mock) BFTValidatorSet(com.radixdlt.hotstuff.bft.BFTValidatorSet) LedgerProof(com.radixdlt.hotstuff.LedgerProof) Serialization(com.radixdlt.serialization.Serialization) WeightedRotatingLeaders(com.radixdlt.hotstuff.liveness.WeightedRotatingLeaders) Sha256Hasher(com.radixdlt.hotstuff.Sha256Hasher) PermissionLevel(com.radixdlt.constraintmachine.PermissionLevel) com.radixdlt.atom(com.radixdlt.atom) ProposerElection(com.radixdlt.hotstuff.liveness.ProposerElection) MockedGenesisModule(com.radixdlt.statecomputer.checkpoint.MockedGenesisModule) View(com.radixdlt.hotstuff.bft.View) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) ImmutableList(com.google.common.collect.ImmutableList) MempoolConfig(com.radixdlt.mempool.MempoolConfig) AccumulatorState(com.radixdlt.ledger.AccumulatorState) RadixEngineCheckpointModule(com.radixdlt.statecomputer.checkpoint.RadixEngineCheckpointModule) UInt256(com.radixdlt.utils.UInt256) Before(org.junit.Before) MempoolAddSuccess(com.radixdlt.mempool.MempoolAddSuccess) BFTHeader(com.radixdlt.hotstuff.BFTHeader) EventDispatcher(com.radixdlt.environment.EventDispatcher) HashCode(com.google.common.hash.HashCode) RadixEngine(com.radixdlt.engine.RadixEngine) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) MempoolRelayTrigger(com.radixdlt.mempool.MempoolRelayTrigger) ForksModule(com.radixdlt.statecomputer.forks.ForksModule) Mockito.verify(org.mockito.Mockito.verify) UnverifiedVertex(com.radixdlt.hotstuff.UnverifiedVertex) BFTNode(com.radixdlt.hotstuff.bft.BFTNode) LedgerUpdate(com.radixdlt.ledger.LedgerUpdate) InMemoryEngineStore(com.radixdlt.store.InMemoryEngineStore) ECKeyPair(com.radixdlt.crypto.ECKeyPair) Rule(org.junit.Rule) Ignore(org.junit.Ignore) BFTValidator(com.radixdlt.hotstuff.bft.BFTValidator) Condition(org.assertj.core.api.Condition) Guice(com.google.inject.Guice) InvalidPermissionException(com.radixdlt.constraintmachine.exceptions.InvalidPermissionException) TemporaryFolder(org.junit.rules.TemporaryFolder) AbstractModule(com.google.inject.AbstractModule) LedgerUpdate(com.radixdlt.ledger.LedgerUpdate) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) ForksModule(com.radixdlt.statecomputer.forks.ForksModule) RadixEngineForksLatestOnlyModule(com.radixdlt.statecomputer.forks.RadixEngineForksLatestOnlyModule) PersistentVertexStore(com.radixdlt.hotstuff.bft.PersistentVertexStore) EventDispatcher(com.radixdlt.environment.EventDispatcher) MempoolRelayTrigger(com.radixdlt.mempool.MempoolRelayTrigger) TypeLiteral(com.google.inject.TypeLiteral) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) ProposerElection(com.radixdlt.hotstuff.liveness.ProposerElection) BFTNode(com.radixdlt.hotstuff.bft.BFTNode) LedgerAccumulator(com.radixdlt.ledger.LedgerAccumulator) SystemCounters(com.radixdlt.counters.SystemCounters) NoOpForksEpochStore(com.radixdlt.statecomputer.forks.NoOpForksEpochStore) AbstractModule(com.google.inject.AbstractModule) NoOpCommittedReader(com.radixdlt.sync.NoOpCommittedReader) NoOpForksEpochStore(com.radixdlt.statecomputer.forks.NoOpForksEpochStore) ForksEpochStore(com.radixdlt.statecomputer.forks.ForksEpochStore) DefaultSerialization(com.radixdlt.DefaultSerialization) Serialization(com.radixdlt.serialization.Serialization) Hasher(com.radixdlt.crypto.Hasher) Sha256Hasher(com.radixdlt.hotstuff.Sha256Hasher) NoOpCommittedReader(com.radixdlt.sync.NoOpCommittedReader) CommittedReader(com.radixdlt.sync.CommittedReader) MempoolAddSuccess(com.radixdlt.mempool.MempoolAddSuccess) WeightedRotatingLeaders(com.radixdlt.hotstuff.liveness.WeightedRotatingLeaders)

Example 3 with MainnetForksModule

use of com.radixdlt.statecomputer.forks.modules.MainnetForksModule in project radixdlt by radixdlt.

the class AbstractRadixEngineTest method setup.

@Before
public void setup() {
    var injector = Guice.createInjector(MempoolConfig.asModule(mempoolMaxSize, 10), new MainnetForksModule(), new RadixEngineForksLatestOnlyModule(RERulesConfig.testingDefault().overrideFeeTable(FeeTable.create(Amount.ofSubunits(UInt256.ONE), Map.of(ValidatorRegisteredCopy.class, Amount.ofSubunits(UInt256.ONE)))).overrideMaxMessageLen(maxMessageLen)), new ForksModule(), new SingleNodeAndPeersDeterministicNetworkModule(TEST_KEY, 1), new MockedGenesisModule(Set.of(TEST_KEY.getPublicKey()), totalTokenAmount, stakeAmount), new AbstractModule() {

        @Override
        protected void configure() {
            bind(BerkeleyRecoverableProcessedTxnStore.class).in(Scopes.SINGLETON);
            Multibinder.newSetBinder(binder(), BerkeleyAdditionalStore.class).addBinding().to(BerkeleyRecoverableProcessedTxnStore.class);
            bindConstant().annotatedWith(DatabaseLocation.class).to(folder.getRoot().getAbsolutePath());
            bindConstant().annotatedWith(NetworkId.class).to(99);
            bind(P2PConfig.class).toInstance(mock(P2PConfig.class));
            bind(AddressBook.class).in(Scopes.SINGLETON);
            var selfUri = RadixNodeUri.fromPubKeyAndAddress(99, TEST_KEY.getPublicKey(), "localhost", 23456);
            bind(RadixNodeUri.class).annotatedWith(Self.class).toInstance(selfUri);
            var addressBookPersistence = mock(AddressBookPersistence.class);
            when(addressBookPersistence.getAllEntries()).thenReturn(ImmutableList.of());
            bind(AddressBookPersistence.class).toInstance(addressBookPersistence);
            var runtimeProperties = mock(RuntimeProperties.class);
            when(runtimeProperties.get(eq("api.transactions.enable"), anyBoolean())).thenReturn(true);
            bind(RuntimeProperties.class).toInstance(runtimeProperties);
        }
    });
    injector.injectMembers(this);
}
Also used : SingleNodeAndPeersDeterministicNetworkModule(com.radixdlt.modules.SingleNodeAndPeersDeterministicNetworkModule) ForksModule(com.radixdlt.statecomputer.forks.ForksModule) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) AddressBookPersistence(com.radixdlt.network.p2p.addressbook.AddressBookPersistence) BerkeleyAdditionalStore(com.radixdlt.store.berkeley.BerkeleyAdditionalStore) RadixEngineForksLatestOnlyModule(com.radixdlt.statecomputer.forks.RadixEngineForksLatestOnlyModule) AbstractModule(com.google.inject.AbstractModule) ValidatorRegisteredCopy(com.radixdlt.application.validators.state.ValidatorRegisteredCopy) BerkeleyRecoverableProcessedTxnStore(com.radixdlt.api.core.reconstruction.BerkeleyRecoverableProcessedTxnStore) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) MockedGenesisModule(com.radixdlt.statecomputer.checkpoint.MockedGenesisModule) RadixNodeUri(com.radixdlt.network.p2p.RadixNodeUri) RuntimeProperties(com.radixdlt.properties.RuntimeProperties) Before(org.junit.Before)

Example 4 with MainnetForksModule

use of com.radixdlt.statecomputer.forks.modules.MainnetForksModule in project radixdlt by radixdlt.

the class GenerateUniverses method main.

public static void main(String[] args) throws Exception {
    Security.insertProviderAt(new BouncyCastleProvider(), 1);
    Options options = new Options();
    options.addOption("h", "help", false, "Show usage information (this message)");
    options.addOption("p", "public-keys", true, "Specify validator keys");
    options.addOption("v", "validator-count", true, "Specify number of validators to generate");
    CommandLineParser parser = new DefaultParser();
    CommandLine cmd = parser.parse(options, args);
    if (!cmd.getArgList().isEmpty()) {
        System.err.println("Extra arguments: " + String.join(" ", cmd.getArgList()));
        usage(options);
        return;
    }
    if (cmd.hasOption('h')) {
        usage(options);
        return;
    }
    var validatorKeys = new HashSet<ECPublicKey>();
    if (cmd.getOptionValue("p") != null) {
        var hexKeys = cmd.getOptionValue("p").split(",");
        for (var hexKey : hexKeys) {
            validatorKeys.add(ECPublicKey.fromHex(hexKey));
        }
    }
    final int validatorsCount = cmd.getOptionValue("v") != null ? Integer.parseInt(cmd.getOptionValue("v")) : 0;
    var generatedValidatorKeys = PrivateKeys.numeric(6).limit(validatorsCount).toList();
    generatedValidatorKeys.stream().map(ECKeyPair::getPublicKey).forEach(validatorKeys::add);
    // Issuances to mnemomic account, keys 1-5, and 1st validator
    final var mnemomicKey = ECPublicKey.fromHex(mnemomicKeyHex);
    final ImmutableList.Builder<TokenIssuance> tokenIssuancesBuilder = ImmutableList.builder();
    tokenIssuancesBuilder.add(TokenIssuance.of(mnemomicKey, DEFAULT_ISSUANCE));
    PrivateKeys.numeric(1).limit(5).map(k -> TokenIssuance.of(k.getPublicKey(), DEFAULT_ISSUANCE)).forEach(tokenIssuancesBuilder::add);
    // Issue tokens to initial validators for now to support application services
    validatorKeys.forEach(pk -> tokenIssuancesBuilder.add(TokenIssuance.of(pk, DEFAULT_ISSUANCE)));
    // Stakes issued by mnemomic account
    var stakes = validatorKeys.stream().map(pk -> new StakeTokens(REAddr.ofPubKeyAccount(mnemomicKey), pk, DEFAULT_STAKE)).collect(Collectors.toSet());
    var timestamp = String.valueOf(Instant.now().getEpochSecond());
    var genesisProvider = Guice.createInjector(new AbstractModule() {

        @Override
        protected void configure() {
            install(new CryptoModule());
            install(new AbstractModule() {

                @Provides
                @Singleton
                private Forks forks(Set<ForkBuilder> forkBuilders) {
                    return Forks.create(forkBuilders.stream().map(ForkBuilder::build).collect(Collectors.toSet()));
                }

                @Provides
                @Singleton
                private CurrentForkView currentForkView(Forks forks) {
                    return new CurrentForkView(forks, forks.genesisFork());
                }

                @Provides
                @Singleton
                @NewestForkConfig
                private ForkConfig newestForkConfig(Forks forks) {
                    return forks.newestFork();
                }
            });
            install(new MainnetForksModule());
            bind(new TypeLiteral<List<TxAction>>() {
            }).annotatedWith(Genesis.class).toInstance(List.of());
            bind(LedgerAccumulator.class).to(SimpleLedgerAccumulatorAndVerifier.class);
            bind(SystemCounters.class).toInstance(new SystemCountersImpl());
            bindConstant().annotatedWith(Genesis.class).to(timestamp);
            bind(new TypeLiteral<Set<StakeTokens>>() {
            }).annotatedWith(Genesis.class).toInstance(stakes);
            bind(new TypeLiteral<ImmutableList<TokenIssuance>>() {
            }).annotatedWith(Genesis.class).toInstance(tokenIssuancesBuilder.build());
            bind(new TypeLiteral<Set<ECPublicKey>>() {
            }).annotatedWith(Genesis.class).toInstance(validatorKeys);
            bindConstant().annotatedWith(MaxValidators.class).to(100);
            OptionalBinder.newOptionalBinder(binder(), Key.get(new TypeLiteral<List<TxAction>>() {
            }, Genesis.class));
        }
    }).getInstance(GenesisProvider.class);
    var genesis = genesisProvider.get().getTxns().get(0);
    IntStream.range(0, generatedValidatorKeys.size()).forEach(i -> {
        System.out.format("export RADIXDLT_VALIDATOR_%s_PRIVKEY=%s%n", i, Bytes.toBase64String(generatedValidatorKeys.get(i).getPrivateKey()));
        System.out.format("export RADIXDLT_VALIDATOR_%s_PUBKEY=%s%n", i, Addressing.ofNetwork(Network.LOCALNET).forNodes().of(generatedValidatorKeys.get(i).getPublicKey()));
    });
    if (validatorsCount > 0) {
        System.out.format("export RADIXDLT_GENESIS_TXN=%s%n", Bytes.toHexString(genesis.getPayload()));
    } else {
        try (var writer = new BufferedWriter(new FileWriter("genesis.json"))) {
            writer.write(new JSONObject().put("genesis", Bytes.toHexString(genesis.getPayload())).toString());
        }
    }
}
Also used : IntStream(java.util.stream.IntStream) CryptoModule(com.radixdlt.modules.CryptoModule) SimpleLedgerAccumulatorAndVerifier(com.radixdlt.ledger.SimpleLedgerAccumulatorAndVerifier) TxAction(com.radixdlt.atom.TxAction) Key(com.google.inject.Key) MaxValidators(com.radixdlt.statecomputer.MaxValidators) Options(org.apache.commons.cli.Options) Security(java.security.Security) ForkBuilder(com.radixdlt.statecomputer.forks.ForkBuilder) Forks(com.radixdlt.statecomputer.forks.Forks) HelpFormatter(org.apache.commons.cli.HelpFormatter) ECPublicKey(com.radixdlt.crypto.ECPublicKey) DefaultParser(org.apache.commons.cli.DefaultParser) HashSet(java.util.HashSet) JSONObject(org.json.JSONObject) ImmutableList(com.google.common.collect.ImmutableList) CurrentForkView(com.radixdlt.statecomputer.forks.CurrentForkView) ForkConfig(com.radixdlt.statecomputer.forks.ForkConfig) CommandLine(org.apache.commons.cli.CommandLine) UInt256(com.radixdlt.utils.UInt256) Genesis(com.radixdlt.statecomputer.checkpoint.Genesis) PrivateKeys(com.radixdlt.utils.PrivateKeys) SystemCounters(com.radixdlt.counters.SystemCounters) Addressing(com.radixdlt.networks.Addressing) NewestForkConfig(com.radixdlt.statecomputer.forks.NewestForkConfig) Network(com.radixdlt.networks.Network) CommandLineParser(org.apache.commons.cli.CommandLineParser) BufferedWriter(java.io.BufferedWriter) FileWriter(java.io.FileWriter) GenesisProvider(com.radixdlt.statecomputer.checkpoint.GenesisProvider) Set(java.util.Set) REAddr(com.radixdlt.identifiers.REAddr) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) BouncyCastleProvider(org.bouncycastle.jce.provider.BouncyCastleProvider) SystemCountersImpl(com.radixdlt.counters.SystemCountersImpl) List(java.util.List) Provides(com.google.inject.Provides) ECKeyPair(com.radixdlt.crypto.ECKeyPair) Bytes(com.radixdlt.utils.Bytes) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) OptionalBinder(com.google.inject.multibindings.OptionalBinder) Guice(com.google.inject.Guice) Amount(com.radixdlt.application.tokens.Amount) TypeLiteral(com.google.inject.TypeLiteral) LedgerAccumulator(com.radixdlt.ledger.LedgerAccumulator) AbstractModule(com.google.inject.AbstractModule) Singleton(com.google.inject.Singleton) Options(org.apache.commons.cli.Options) HashSet(java.util.HashSet) Set(java.util.Set) CurrentForkView(com.radixdlt.statecomputer.forks.CurrentForkView) ImmutableList(com.google.common.collect.ImmutableList) FileWriter(java.io.FileWriter) BufferedWriter(java.io.BufferedWriter) TypeLiteral(com.google.inject.TypeLiteral) MainnetForksModule(com.radixdlt.statecomputer.forks.modules.MainnetForksModule) TxAction(com.radixdlt.atom.TxAction) ImmutableList(com.google.common.collect.ImmutableList) List(java.util.List) CommandLineParser(org.apache.commons.cli.CommandLineParser) BouncyCastleProvider(org.bouncycastle.jce.provider.BouncyCastleProvider) DefaultParser(org.apache.commons.cli.DefaultParser) HashSet(java.util.HashSet) Forks(com.radixdlt.statecomputer.forks.Forks) MaxValidators(com.radixdlt.statecomputer.MaxValidators) ForkConfig(com.radixdlt.statecomputer.forks.ForkConfig) NewestForkConfig(com.radixdlt.statecomputer.forks.NewestForkConfig) LedgerAccumulator(com.radixdlt.ledger.LedgerAccumulator) CryptoModule(com.radixdlt.modules.CryptoModule) SystemCounters(com.radixdlt.counters.SystemCounters) NewestForkConfig(com.radixdlt.statecomputer.forks.NewestForkConfig) Provides(com.google.inject.Provides) ForkBuilder(com.radixdlt.statecomputer.forks.ForkBuilder) AbstractModule(com.google.inject.AbstractModule) CommandLine(org.apache.commons.cli.CommandLine) JSONObject(org.json.JSONObject) Singleton(com.google.inject.Singleton) SystemCountersImpl(com.radixdlt.counters.SystemCountersImpl) Genesis(com.radixdlt.statecomputer.checkpoint.Genesis)

Aggregations

AbstractModule (com.google.inject.AbstractModule)4 MainnetForksModule (com.radixdlt.statecomputer.forks.modules.MainnetForksModule)4 MockedGenesisModule (com.radixdlt.statecomputer.checkpoint.MockedGenesisModule)3 ForksModule (com.radixdlt.statecomputer.forks.ForksModule)3 RadixEngineForksLatestOnlyModule (com.radixdlt.statecomputer.forks.RadixEngineForksLatestOnlyModule)3 Before (org.junit.Before)3 ImmutableList (com.google.common.collect.ImmutableList)2 Guice (com.google.inject.Guice)2 TypeLiteral (com.google.inject.TypeLiteral)2 BerkeleyRecoverableProcessedTxnStore (com.radixdlt.api.core.reconstruction.BerkeleyRecoverableProcessedTxnStore)2 Amount (com.radixdlt.application.tokens.Amount)2 TxAction (com.radixdlt.atom.TxAction)2 SystemCounters (com.radixdlt.counters.SystemCounters)2 SystemCountersImpl (com.radixdlt.counters.SystemCountersImpl)2 ECKeyPair (com.radixdlt.crypto.ECKeyPair)2 LedgerAccumulator (com.radixdlt.ledger.LedgerAccumulator)2 SimpleLedgerAccumulatorAndVerifier (com.radixdlt.ledger.SimpleLedgerAccumulatorAndVerifier)2 Genesis (com.radixdlt.statecomputer.checkpoint.Genesis)2 CurrentForkView (com.radixdlt.statecomputer.forks.CurrentForkView)2 UInt256 (com.radixdlt.utils.UInt256)2