Search in sources :

Example 16 with ActivationConfig

use of org.ethereum.config.blockchain.upgrades.ActivationConfig in project rskj by rsksmart.

the class BlockFactoryTest method setUp.

@Before
public void setUp() {
    activationConfig = mock(ActivationConfig.class);
    factory = new BlockFactory(activationConfig);
}
Also used : BlockFactory(org.ethereum.core.BlockFactory) ActivationConfig(org.ethereum.config.blockchain.upgrades.ActivationConfig) Before(org.junit.Before)

Example 17 with ActivationConfig

use of org.ethereum.config.blockchain.upgrades.ActivationConfig in project rskj by rsksmart.

the class RskContextTest method shouldBuildAsyncNodeBlockProcessor.

@Test
public void shouldBuildAsyncNodeBlockProcessor() {
    doReturn(new GarbageCollectorConfig(false, 1000, 3)).when(testProperties).garbageCollectorConfig();
    doReturn(1).when(testProperties).getNumOfAccountSlots();
    doReturn(true).when(testProperties).fastBlockPropagation();
    ActivationConfig config = mock(ActivationConfig.class);
    doReturn(true).when(config).isActive(eq(ConsensusRule.RSKIP126), anyLong());
    doReturn(config).when(testProperties).getActivationConfig();
    Constants constants = mock(Constants.class);
    doReturn(constants).when(testProperties).getNetworkConstants();
    BridgeConstants bridgeConstants = mock(BridgeConstants.class);
    doReturn(bridgeConstants).when(constants).getBridgeConstants();
    doReturn(1024).when(constants).getGasLimitBoundDivisor();
    NodeBlockProcessor nodeBlockProcessor = rskContext.getNodeBlockProcessor();
    assertThat(nodeBlockProcessor, is(instanceOf(AsyncNodeBlockProcessor.class)));
}
Also used : NodeBlockProcessor(co.rsk.net.NodeBlockProcessor) AsyncNodeBlockProcessor(co.rsk.net.AsyncNodeBlockProcessor) Constants(org.ethereum.config.Constants) ActivationConfig(org.ethereum.config.blockchain.upgrades.ActivationConfig) Test(org.junit.Test)

Example 18 with ActivationConfig

use of org.ethereum.config.blockchain.upgrades.ActivationConfig in project rskj by rsksmart.

the class BridgeTestPowerMock method getBtcTransactionConfirmationsAfterWasabi_ok.

@Test
public void getBtcTransactionConfirmationsAfterWasabi_ok() throws Exception {
    Transaction txMock = mock(Transaction.class);
    BridgeSupportFactory bridgeSupportFactoryMock = mock(BridgeSupportFactory.class);
    Bridge bridge = new Bridge(PrecompiledContracts.BRIDGE_ADDR, constants, activationConfig, bridgeSupportFactoryMock);
    bridge.init(txMock, getGenesisBlock(), createRepository().startTracking(), null, null, null);
    BridgeSupport bridgeSupportMock = mock(BridgeSupport.class);
    Whitebox.setInternalState(bridge, "bridgeSupport", bridgeSupportMock);
    when(bridgeSupportFactoryMock.newInstance(any(), any(), any(), any())).thenReturn(bridgeSupportMock);
    byte[] btcTxHash = Sha256Hash.of(Hex.decode("aabbcc")).getBytes();
    byte[] btcBlockHash = Sha256Hash.of(Hex.decode("ddeeff")).getBytes();
    byte[][] merkleBranchHashes = new byte[][] { Sha256Hash.of(Hex.decode("11")).getBytes(), Sha256Hash.of(Hex.decode("22")).getBytes(), Sha256Hash.of(Hex.decode("33")).getBytes() };
    BigInteger merkleBranchBits = BigInteger.valueOf(123);
    MerkleBranch merkleBranch = mock(MerkleBranch.class);
    PowerMockito.whenNew(MerkleBranch.class).withArguments(any(List.class), any(Integer.class)).then((Answer<MerkleBranch>) invocation -> {
        List<Sha256Hash> hashes = invocation.getArgument(0);
        Assert.assertArrayEquals(merkleBranchHashes[0], hashes.get(0).getBytes());
        Assert.assertArrayEquals(merkleBranchHashes[1], hashes.get(1).getBytes());
        Assert.assertArrayEquals(merkleBranchHashes[2], hashes.get(2).getBytes());
        Integer bits = invocation.getArgument(1);
        Assert.assertEquals(123, bits.intValue());
        return merkleBranch;
    });
    when(bridgeSupportMock.getBtcTransactionConfirmations(any(Sha256Hash.class), any(Sha256Hash.class), any(MerkleBranch.class))).then((Answer<Integer>) invocation -> {
        Sha256Hash txHash = invocation.getArgument(0);
        Assert.assertArrayEquals(btcTxHash, txHash.getBytes());
        Sha256Hash blockHash = invocation.getArgument(1);
        Assert.assertArrayEquals(btcBlockHash, blockHash.getBytes());
        MerkleBranch merkleBranchArg = invocation.getArgument(2);
        Assert.assertEquals(merkleBranch, merkleBranchArg);
        return 78;
    });
    Assert.assertEquals(78, bridge.getBtcTransactionConfirmations(new Object[] { btcTxHash, btcBlockHash, merkleBranchBits, merkleBranchHashes }));
}
Also used : OneOffWhiteListEntry(co.rsk.peg.whitelist.OneOffWhiteListEntry) CoreMatchers.is(org.hamcrest.CoreMatchers.is) VMException(org.ethereum.vm.exception.VMException) HashMapDB(org.ethereum.datasource.HashMapDB) TestGenesisLoader(co.rsk.core.genesis.TestGenesisLoader) RskAddress(co.rsk.core.RskAddress) Utils.uint32ToByteStreamLE(co.rsk.bitcoinj.core.Utils.uint32ToByteStreamLE) Keccak256(co.rsk.crypto.Keccak256) SimpleBtcTransaction(co.rsk.peg.bitcoin.SimpleBtcTransaction) ActivationConfig(org.ethereum.config.blockchain.upgrades.ActivationConfig) MutableTrieCache(co.rsk.db.MutableTrieCache) RegTestParams(co.rsk.bitcoinj.params.RegTestParams) co.rsk.bitcoinj.core(co.rsk.bitcoinj.core) PrecompiledContracts(org.ethereum.vm.PrecompiledContracts) BigInteger(java.math.BigInteger) MerkleBranch(co.rsk.peg.bitcoin.MerkleBranch) ProgramInvoke(org.ethereum.vm.program.invoke.ProgramInvoke) EVMAssembler(co.rsk.asm.EVMAssembler) MutableTrieImpl(co.rsk.db.MutableTrieImpl) BlockGenerator(co.rsk.blockchain.utils.BlockGenerator) Instant(java.time.Instant) ActivationConfigsForTest(org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest) MutableRepository(org.ethereum.db.MutableRepository) StandardCharsets(java.nio.charset.StandardCharsets) ScriptBuilder(co.rsk.bitcoinj.script.ScriptBuilder) TestSystemProperties(co.rsk.config.TestSystemProperties) Modifier(java.lang.reflect.Modifier) RskSystemProperties(co.rsk.config.RskSystemProperties) org.ethereum.core(org.ethereum.core) BlockDifficulty(co.rsk.core.BlockDifficulty) Whitebox(org.powermock.reflect.Whitebox) java.util(java.util) BeforeClass(org.junit.BeforeClass) ByteArrayOutputStream(java.io.ByteArrayOutputStream) RunWith(org.junit.runner.RunWith) Hex(org.bouncycastle.util.encoders.Hex) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BridgeConstants(co.rsk.config.BridgeConstants) BridgeRegTestConstants(co.rsk.config.BridgeRegTestConstants) PowerMockRunner(org.powermock.modules.junit4.PowerMockRunner) PowerMockito(org.powermock.api.mockito.PowerMockito) TrieStore(co.rsk.trie.TrieStore) Before(org.junit.Before) OutputStream(java.io.OutputStream) TypeConverter(org.ethereum.rpc.TypeConverter) Logger(org.slf4j.Logger) Files(java.nio.file.Files) HashUtil(org.ethereum.crypto.HashUtil) Test(org.junit.Test) IOException(java.io.IOException) Field(java.lang.reflect.Field) ProgramInvokeMockImpl(org.ethereum.vm.program.invoke.ProgramInvokeMockImpl) World(co.rsk.test.World) Program(org.ethereum.vm.program.Program) UnlimitedWhiteListEntry(co.rsk.peg.whitelist.UnlimitedWhiteListEntry) Mockito(org.mockito.Mockito) BlockStoreException(co.rsk.bitcoinj.store.BlockStoreException) ByteUtil(org.ethereum.util.ByteUtil) Paths(java.nio.file.Paths) TrieStoreImpl(co.rsk.trie.TrieStoreImpl) VM(org.ethereum.vm.VM) Assert(org.junit.Assert) Trie(co.rsk.trie.Trie) ConsensusRule(org.ethereum.config.blockchain.upgrades.ConsensusRule) Constants(org.ethereum.config.Constants) ECKey(org.ethereum.crypto.ECKey) MerkleBranch(co.rsk.peg.bitcoin.MerkleBranch) BigInteger(java.math.BigInteger) SimpleBtcTransaction(co.rsk.peg.bitcoin.SimpleBtcTransaction) BigInteger(java.math.BigInteger) ActivationConfigsForTest(org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 19 with ActivationConfig

use of org.ethereum.config.blockchain.upgrades.ActivationConfig in project rskj by rsksmart.

the class BridgeTestPowerMock method getBtcTransactionConfirmationsAfterWasabi_merkleBranchConstructionError.

@Test
public void getBtcTransactionConfirmationsAfterWasabi_merkleBranchConstructionError() throws Exception {
    Transaction txMock = mock(Transaction.class);
    BridgeSupportFactory bridgeSupportFactory = new BridgeSupportFactory(new RepositoryBtcBlockStoreWithCache.Factory(bridgeConstants.getBtcParams()), bridgeConstants, activationConfig);
    Bridge bridge = PowerMockito.spy(new Bridge(PrecompiledContracts.BRIDGE_ADDR, constants, activationConfig, bridgeSupportFactory));
    bridge.init(txMock, getGenesisBlock(), createRepository().startTracking(), null, null, null);
    BridgeSupport bridgeSupportMock = mock(BridgeSupport.class);
    Whitebox.setInternalState(bridge, "bridgeSupport", bridgeSupportMock);
    byte[] btcTxHash = Sha256Hash.of(Hex.decode("aabbcc")).getBytes();
    byte[] btcBlockHash = Sha256Hash.of(Hex.decode("ddeeff")).getBytes();
    byte[][] merkleBranchHashes = new byte[][] { Sha256Hash.of(Hex.decode("11")).getBytes(), Sha256Hash.of(Hex.decode("22")).getBytes(), Sha256Hash.of(Hex.decode("33")).getBytes() };
    BigInteger merkleBranchBits = BigInteger.valueOf(123);
    MerkleBranch merkleBranch = mock(MerkleBranch.class);
    PowerMockito.whenNew(MerkleBranch.class).withArguments(any(List.class), any(Integer.class)).then((Answer<MerkleBranch>) invocation -> {
        List<Sha256Hash> hashes = invocation.getArgument(0);
        Assert.assertArrayEquals(merkleBranchHashes[0], hashes.get(0).getBytes());
        Assert.assertArrayEquals(merkleBranchHashes[1], hashes.get(1).getBytes());
        Assert.assertArrayEquals(merkleBranchHashes[2], hashes.get(2).getBytes());
        Integer bits = invocation.getArgument(1);
        Assert.assertEquals(123, bits.intValue());
        throw new IllegalArgumentException("blabla");
    });
    try {
        bridge.getBtcTransactionConfirmations(new Object[] { btcTxHash, btcBlockHash, merkleBranchBits, merkleBranchHashes });
        Assert.fail();
    } catch (VMException e) {
        Assert.assertTrue(e.getMessage().contains("in getBtcTransactionConfirmations"));
        Assert.assertEquals(IllegalArgumentException.class, e.getCause().getClass());
        verify(bridgeSupportMock, never()).getBtcTransactionConfirmations(any(), any(), any());
    }
}
Also used : OneOffWhiteListEntry(co.rsk.peg.whitelist.OneOffWhiteListEntry) CoreMatchers.is(org.hamcrest.CoreMatchers.is) VMException(org.ethereum.vm.exception.VMException) HashMapDB(org.ethereum.datasource.HashMapDB) TestGenesisLoader(co.rsk.core.genesis.TestGenesisLoader) RskAddress(co.rsk.core.RskAddress) Utils.uint32ToByteStreamLE(co.rsk.bitcoinj.core.Utils.uint32ToByteStreamLE) Keccak256(co.rsk.crypto.Keccak256) SimpleBtcTransaction(co.rsk.peg.bitcoin.SimpleBtcTransaction) ActivationConfig(org.ethereum.config.blockchain.upgrades.ActivationConfig) MutableTrieCache(co.rsk.db.MutableTrieCache) RegTestParams(co.rsk.bitcoinj.params.RegTestParams) co.rsk.bitcoinj.core(co.rsk.bitcoinj.core) PrecompiledContracts(org.ethereum.vm.PrecompiledContracts) BigInteger(java.math.BigInteger) MerkleBranch(co.rsk.peg.bitcoin.MerkleBranch) ProgramInvoke(org.ethereum.vm.program.invoke.ProgramInvoke) EVMAssembler(co.rsk.asm.EVMAssembler) MutableTrieImpl(co.rsk.db.MutableTrieImpl) BlockGenerator(co.rsk.blockchain.utils.BlockGenerator) Instant(java.time.Instant) ActivationConfigsForTest(org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest) MutableRepository(org.ethereum.db.MutableRepository) StandardCharsets(java.nio.charset.StandardCharsets) ScriptBuilder(co.rsk.bitcoinj.script.ScriptBuilder) TestSystemProperties(co.rsk.config.TestSystemProperties) Modifier(java.lang.reflect.Modifier) RskSystemProperties(co.rsk.config.RskSystemProperties) org.ethereum.core(org.ethereum.core) BlockDifficulty(co.rsk.core.BlockDifficulty) Whitebox(org.powermock.reflect.Whitebox) java.util(java.util) BeforeClass(org.junit.BeforeClass) ByteArrayOutputStream(java.io.ByteArrayOutputStream) RunWith(org.junit.runner.RunWith) Hex(org.bouncycastle.util.encoders.Hex) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BridgeConstants(co.rsk.config.BridgeConstants) BridgeRegTestConstants(co.rsk.config.BridgeRegTestConstants) PowerMockRunner(org.powermock.modules.junit4.PowerMockRunner) PowerMockito(org.powermock.api.mockito.PowerMockito) TrieStore(co.rsk.trie.TrieStore) Before(org.junit.Before) OutputStream(java.io.OutputStream) TypeConverter(org.ethereum.rpc.TypeConverter) Logger(org.slf4j.Logger) Files(java.nio.file.Files) HashUtil(org.ethereum.crypto.HashUtil) Test(org.junit.Test) IOException(java.io.IOException) Field(java.lang.reflect.Field) ProgramInvokeMockImpl(org.ethereum.vm.program.invoke.ProgramInvokeMockImpl) World(co.rsk.test.World) Program(org.ethereum.vm.program.Program) UnlimitedWhiteListEntry(co.rsk.peg.whitelist.UnlimitedWhiteListEntry) Mockito(org.mockito.Mockito) BlockStoreException(co.rsk.bitcoinj.store.BlockStoreException) ByteUtil(org.ethereum.util.ByteUtil) Paths(java.nio.file.Paths) TrieStoreImpl(co.rsk.trie.TrieStoreImpl) VM(org.ethereum.vm.VM) Assert(org.junit.Assert) Trie(co.rsk.trie.Trie) ConsensusRule(org.ethereum.config.blockchain.upgrades.ConsensusRule) Constants(org.ethereum.config.Constants) ECKey(org.ethereum.crypto.ECKey) MerkleBranch(co.rsk.peg.bitcoin.MerkleBranch) BigInteger(java.math.BigInteger) SimpleBtcTransaction(co.rsk.peg.bitcoin.SimpleBtcTransaction) VMException(org.ethereum.vm.exception.VMException) BigInteger(java.math.BigInteger) ActivationConfigsForTest(org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 20 with ActivationConfig

use of org.ethereum.config.blockchain.upgrades.ActivationConfig in project rskj by rsksmart.

the class BridgeTestPowerMock method getBtcTransactionConfirmationsAfterWasabi_errorInBridgeSupport.

@Test
public void getBtcTransactionConfirmationsAfterWasabi_errorInBridgeSupport() throws Exception {
    Transaction txMock = mock(Transaction.class);
    BridgeSupportFactory bridgeSupportFactory = new BridgeSupportFactory(new RepositoryBtcBlockStoreWithCache.Factory(bridgeConstants.getBtcParams()), bridgeConstants, activationConfig);
    Bridge bridge = PowerMockito.spy(new Bridge(PrecompiledContracts.BRIDGE_ADDR, constants, activationConfig, bridgeSupportFactory));
    bridge.init(txMock, getGenesisBlock(), createRepository().startTracking(), null, null, null);
    BridgeSupport bridgeSupportMock = mock(BridgeSupport.class);
    Whitebox.setInternalState(bridge, "bridgeSupport", bridgeSupportMock);
    byte[] btcTxHash = Sha256Hash.of(Hex.decode("aabbcc")).getBytes();
    byte[] btcBlockHash = Sha256Hash.of(Hex.decode("ddeeff")).getBytes();
    byte[][] merkleBranchHashes = new byte[][] { Sha256Hash.of(Hex.decode("11")).getBytes(), Sha256Hash.of(Hex.decode("22")).getBytes(), Sha256Hash.of(Hex.decode("33")).getBytes() };
    BigInteger merkleBranchBits = BigInteger.valueOf(123);
    MerkleBranch merkleBranch = mock(MerkleBranch.class);
    PowerMockito.whenNew(MerkleBranch.class).withArguments(any(List.class), any(Integer.class)).then((Answer<MerkleBranch>) invocation -> {
        List<Sha256Hash> hashes = invocation.getArgument(0);
        Assert.assertArrayEquals(merkleBranchHashes[0], hashes.get(0).getBytes());
        Assert.assertArrayEquals(merkleBranchHashes[1], hashes.get(1).getBytes());
        Assert.assertArrayEquals(merkleBranchHashes[2], hashes.get(2).getBytes());
        Integer bits = invocation.getArgument(1);
        Assert.assertEquals(123, bits.intValue());
        return merkleBranch;
    });
    when(bridgeSupportMock.getBtcTransactionConfirmations(any(Sha256Hash.class), any(Sha256Hash.class), any(MerkleBranch.class))).then((Answer<Integer>) invocation -> {
        Sha256Hash txHash = invocation.getArgument(0);
        Assert.assertArrayEquals(btcTxHash, txHash.getBytes());
        Sha256Hash blockHash = invocation.getArgument(1);
        Assert.assertArrayEquals(btcBlockHash, blockHash.getBytes());
        MerkleBranch merkleBranchArg = invocation.getArgument(2);
        Assert.assertEquals(merkleBranch, merkleBranchArg);
        throw new VMException("bla bla bla");
    });
    try {
        bridge.getBtcTransactionConfirmations(new Object[] { btcTxHash, btcBlockHash, merkleBranchBits, merkleBranchHashes });
        Assert.fail();
    } catch (VMException e) {
        Assert.assertTrue(e.getMessage().contains("in getBtcTransactionConfirmations"));
        Assert.assertEquals(VMException.class, e.getCause().getClass());
        Assert.assertTrue(e.getCause().getMessage().contains("bla bla bla"));
    }
}
Also used : OneOffWhiteListEntry(co.rsk.peg.whitelist.OneOffWhiteListEntry) CoreMatchers.is(org.hamcrest.CoreMatchers.is) VMException(org.ethereum.vm.exception.VMException) HashMapDB(org.ethereum.datasource.HashMapDB) TestGenesisLoader(co.rsk.core.genesis.TestGenesisLoader) RskAddress(co.rsk.core.RskAddress) Utils.uint32ToByteStreamLE(co.rsk.bitcoinj.core.Utils.uint32ToByteStreamLE) Keccak256(co.rsk.crypto.Keccak256) SimpleBtcTransaction(co.rsk.peg.bitcoin.SimpleBtcTransaction) ActivationConfig(org.ethereum.config.blockchain.upgrades.ActivationConfig) MutableTrieCache(co.rsk.db.MutableTrieCache) RegTestParams(co.rsk.bitcoinj.params.RegTestParams) co.rsk.bitcoinj.core(co.rsk.bitcoinj.core) PrecompiledContracts(org.ethereum.vm.PrecompiledContracts) BigInteger(java.math.BigInteger) MerkleBranch(co.rsk.peg.bitcoin.MerkleBranch) ProgramInvoke(org.ethereum.vm.program.invoke.ProgramInvoke) EVMAssembler(co.rsk.asm.EVMAssembler) MutableTrieImpl(co.rsk.db.MutableTrieImpl) BlockGenerator(co.rsk.blockchain.utils.BlockGenerator) Instant(java.time.Instant) ActivationConfigsForTest(org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest) MutableRepository(org.ethereum.db.MutableRepository) StandardCharsets(java.nio.charset.StandardCharsets) ScriptBuilder(co.rsk.bitcoinj.script.ScriptBuilder) TestSystemProperties(co.rsk.config.TestSystemProperties) Modifier(java.lang.reflect.Modifier) RskSystemProperties(co.rsk.config.RskSystemProperties) org.ethereum.core(org.ethereum.core) BlockDifficulty(co.rsk.core.BlockDifficulty) Whitebox(org.powermock.reflect.Whitebox) java.util(java.util) BeforeClass(org.junit.BeforeClass) ByteArrayOutputStream(java.io.ByteArrayOutputStream) RunWith(org.junit.runner.RunWith) Hex(org.bouncycastle.util.encoders.Hex) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) BridgeConstants(co.rsk.config.BridgeConstants) BridgeRegTestConstants(co.rsk.config.BridgeRegTestConstants) PowerMockRunner(org.powermock.modules.junit4.PowerMockRunner) PowerMockito(org.powermock.api.mockito.PowerMockito) TrieStore(co.rsk.trie.TrieStore) Before(org.junit.Before) OutputStream(java.io.OutputStream) TypeConverter(org.ethereum.rpc.TypeConverter) Logger(org.slf4j.Logger) Files(java.nio.file.Files) HashUtil(org.ethereum.crypto.HashUtil) Test(org.junit.Test) IOException(java.io.IOException) Field(java.lang.reflect.Field) ProgramInvokeMockImpl(org.ethereum.vm.program.invoke.ProgramInvokeMockImpl) World(co.rsk.test.World) Program(org.ethereum.vm.program.Program) UnlimitedWhiteListEntry(co.rsk.peg.whitelist.UnlimitedWhiteListEntry) Mockito(org.mockito.Mockito) BlockStoreException(co.rsk.bitcoinj.store.BlockStoreException) ByteUtil(org.ethereum.util.ByteUtil) Paths(java.nio.file.Paths) TrieStoreImpl(co.rsk.trie.TrieStoreImpl) VM(org.ethereum.vm.VM) Assert(org.junit.Assert) Trie(co.rsk.trie.Trie) ConsensusRule(org.ethereum.config.blockchain.upgrades.ConsensusRule) Constants(org.ethereum.config.Constants) ECKey(org.ethereum.crypto.ECKey) MerkleBranch(co.rsk.peg.bitcoin.MerkleBranch) BigInteger(java.math.BigInteger) SimpleBtcTransaction(co.rsk.peg.bitcoin.SimpleBtcTransaction) VMException(org.ethereum.vm.exception.VMException) BigInteger(java.math.BigInteger) ActivationConfigsForTest(org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

ActivationConfig (org.ethereum.config.blockchain.upgrades.ActivationConfig)30 Test (org.junit.Test)25 ActivationConfigsForTest (org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest)19 RskAddress (co.rsk.core.RskAddress)9 RskSystemProperties (co.rsk.config.RskSystemProperties)8 Before (org.junit.Before)8 BlockGenerator (co.rsk.blockchain.utils.BlockGenerator)7 co.rsk.bitcoinj.core (co.rsk.bitcoinj.core)6 Keccak256 (co.rsk.crypto.Keccak256)5 Trie (co.rsk.trie.Trie)5 TrieStore (co.rsk.trie.TrieStore)5 TrieStoreImpl (co.rsk.trie.TrieStoreImpl)5 BigInteger (java.math.BigInteger)5 Constants (org.ethereum.config.Constants)5 BlockStoreException (co.rsk.bitcoinj.store.BlockStoreException)4 TestSystemProperties (co.rsk.config.TestSystemProperties)4 IOException (java.io.IOException)4 CallTransaction (org.ethereum.core.CallTransaction)4 Transaction (org.ethereum.core.Transaction)4 EVMAssembler (co.rsk.asm.EVMAssembler)3