Search in sources :

Example 1 with PrivateMetadataUpdater

use of org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater in project besu by hyperledger.

the class FlexiblePrivacyPrecompiledContractTest method setUp.

@Before
public void setUp() {
    final MutableWorldState mutableWorldState = mock(MutableWorldState.class);
    when(mutableWorldState.updater()).thenReturn(mock(WorldUpdater.class));
    when(worldStateArchive.getMutable()).thenReturn(mutableWorldState);
    when(worldStateArchive.getMutable(any(), any())).thenReturn(Optional.of(mutableWorldState));
    final PrivateStateStorage.Updater storageUpdater = mock(PrivateStateStorage.Updater.class);
    when(privateStateStorage.getPrivacyGroupHeadBlockMap(any())).thenReturn(Optional.of(PrivacyGroupHeadBlockMap.empty()));
    when(privateStateStorage.getPrivateBlockMetadata(any(), any())).thenReturn(Optional.empty());
    when(storageUpdater.putPrivateBlockMetadata(nullable(Bytes32.class), nullable(Bytes32.class), any())).thenReturn(storageUpdater);
    when(storageUpdater.putPrivacyGroupHeadBlockMap(nullable(Bytes32.class), any())).thenReturn(storageUpdater);
    when(storageUpdater.putTransactionReceipt(nullable(Bytes32.class), nullable(Bytes32.class), any())).thenReturn(storageUpdater);
    when(privateStateStorage.updater()).thenReturn(storageUpdater);
    messageFrame = mock(MessageFrame.class);
    final BlockDataGenerator blockGenerator = new BlockDataGenerator();
    final Block genesis = blockGenerator.genesisBlock();
    final Block block = blockGenerator.block(new BlockDataGenerator.BlockOptions().setParentHash(genesis.getHeader().getHash()));
    when(messageFrame.getBlockValues()).thenReturn(block.getHeader());
    final PrivateMetadataUpdater privateMetadataUpdater = mock(PrivateMetadataUpdater.class);
    final PrivacyGroupHeadBlockMap privacyGroupHeadBlockMap = mock(PrivacyGroupHeadBlockMap.class);
    when(messageFrame.getContextVariable(KEY_PRIVATE_METADATA_UPDATER)).thenReturn(privateMetadataUpdater);
    when(messageFrame.hasContextVariable(KEY_PRIVATE_METADATA_UPDATER)).thenReturn(true);
    when(messageFrame.getContextVariable(KEY_IS_PERSISTING_PRIVATE_STATE, false)).thenReturn(false);
    when(privateMetadataUpdater.getPrivacyGroupHeadBlockMap()).thenReturn(privacyGroupHeadBlockMap);
}
Also used : MutableWorldState(org.hyperledger.besu.ethereum.core.MutableWorldState) WorldUpdater(org.hyperledger.besu.evm.worldstate.WorldUpdater) MessageFrame(org.hyperledger.besu.evm.frame.MessageFrame) Block(org.hyperledger.besu.ethereum.core.Block) PrivateStateStorage(org.hyperledger.besu.ethereum.privacy.storage.PrivateStateStorage) Bytes32(org.apache.tuweni.bytes.Bytes32) BlockDataGenerator(org.hyperledger.besu.ethereum.core.BlockDataGenerator) PrivateMetadataUpdater(org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater) PrivacyGroupHeadBlockMap(org.hyperledger.besu.ethereum.privacy.storage.PrivacyGroupHeadBlockMap) Before(org.junit.Before)

Example 2 with PrivateMetadataUpdater

use of org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater in project besu by hyperledger.

the class PrivateMetadataUpdaterTest method before.

@Before
public void before() {
    blockHeader = mock(BlockHeader.class);
    privateStateStorage = new InMemoryPrivacyStorageProvider().createPrivateStateStorage();
    final Hash hashBlockZero = Hash.ZERO;
    when(blockHeader.getParentHash()).thenReturn(hashBlockZero);
    updater = new PrivateMetadataUpdater(blockHeader, privateStateStorage);
    hashBlockOne = Hash.fromHexString("1111111111111111111111111111111111111111111111111111111111111111");
    stateRoot = Hash.fromHexString("2222222222222222222222222222222222222222222222222222222222222222");
    privacyGroupId = Bytes32.fromHexString("3333333333333333333333333333333333333333333333333333333333333333");
}
Also used : BlockHeader(org.hyperledger.besu.ethereum.core.BlockHeader) Hash(org.hyperledger.besu.datatypes.Hash) InMemoryPrivacyStorageProvider(org.hyperledger.besu.ethereum.core.InMemoryPrivacyStorageProvider) PrivateMetadataUpdater(org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater) Before(org.junit.Before)

Example 3 with PrivateMetadataUpdater

use of org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater in project besu by hyperledger.

the class MainnetTransactionProcessor method processTransaction.

public TransactionProcessingResult processTransaction(final Blockchain blockchain, final WorldUpdater worldState, final ProcessableBlockHeader blockHeader, final Transaction transaction, final Address miningBeneficiary, final OperationTracer operationTracer, final BlockHashLookup blockHashLookup, final Boolean isPersistingPrivateState, final TransactionValidationParams transactionValidationParams, final PrivateMetadataUpdater privateMetadataUpdater) {
    try {
        LOG.trace("Starting execution of {}", transaction);
        ValidationResult<TransactionInvalidReason> validationResult = transactionValidator.validate(transaction, blockHeader.getBaseFee(), transactionValidationParams);
        // be signed correctly to extract the sender).
        if (!validationResult.isValid()) {
            LOG.debug("Invalid transaction: {}", validationResult.getErrorMessage());
            return TransactionProcessingResult.invalid(validationResult);
        }
        final Address senderAddress = transaction.getSender();
        final EvmAccount sender = worldState.getOrCreateSenderAccount(senderAddress);
        validationResult = transactionValidator.validateForSender(transaction, sender, transactionValidationParams);
        if (!validationResult.isValid()) {
            LOG.debug("Invalid transaction: {}", validationResult.getErrorMessage());
            return TransactionProcessingResult.invalid(validationResult);
        }
        final MutableAccount senderMutableAccount = sender.getMutable();
        final long previousNonce = senderMutableAccount.incrementNonce();
        final Wei transactionGasPrice = feeMarket.getTransactionPriceCalculator().price(transaction, blockHeader.getBaseFee());
        LOG.trace("Incremented sender {} nonce ({} -> {})", senderAddress, previousNonce, sender.getNonce());
        final Wei upfrontGasCost = transaction.getUpfrontGasCost(transactionGasPrice);
        final Wei previousBalance = senderMutableAccount.decrementBalance(upfrontGasCost);
        LOG.trace("Deducted sender {} upfront gas cost {} ({} -> {})", senderAddress, upfrontGasCost, previousBalance, sender.getBalance());
        final List<AccessListEntry> accessListEntries = transaction.getAccessList().orElse(List.of());
        // we need to keep a separate hash set of addresses in case they specify no storage.
        // No-storage is a common pattern, especially for Externally Owned Accounts
        final Set<Address> addressList = new HashSet<>();
        final Multimap<Address, Bytes32> storageList = HashMultimap.create();
        int accessListStorageCount = 0;
        for (final var entry : accessListEntries) {
            final Address address = entry.getAddress();
            addressList.add(address);
            final List<Bytes32> storageKeys = entry.getStorageKeys();
            storageList.putAll(address, storageKeys);
            accessListStorageCount += storageKeys.size();
        }
        final long intrinsicGas = gasCalculator.transactionIntrinsicGasCost(transaction.getPayload(), transaction.isContractCreation());
        final long accessListGas = gasCalculator.accessListGasCost(accessListEntries.size(), accessListStorageCount);
        final long gasAvailable = transaction.getGasLimit() - intrinsicGas - accessListGas;
        LOG.trace("Gas available for execution {} = {} - {} (limit - intrinsic)", gasAvailable, transaction.getGasLimit(), intrinsicGas);
        final WorldUpdater worldUpdater = worldState.updater();
        final Deque<MessageFrame> messageFrameStack = new ArrayDeque<>();
        final ImmutableMap.Builder<String, Object> contextVariablesBuilder = ImmutableMap.<String, Object>builder().put(KEY_IS_PERSISTING_PRIVATE_STATE, isPersistingPrivateState).put(KEY_TRANSACTION, transaction).put(KEY_TRANSACTION_HASH, transaction.getHash());
        if (privateMetadataUpdater != null) {
            contextVariablesBuilder.put(KEY_PRIVATE_METADATA_UPDATER, privateMetadataUpdater);
        }
        final MessageFrame.Builder commonMessageFrameBuilder = MessageFrame.builder().messageFrameStack(messageFrameStack).maxStackSize(maxStackSize).worldUpdater(worldUpdater.updater()).initialGas(gasAvailable).originator(senderAddress).gasPrice(transactionGasPrice).sender(senderAddress).value(transaction.getValue()).apparentValue(transaction.getValue()).blockValues(blockHeader).depth(0).completer(__ -> {
        }).miningBeneficiary(miningBeneficiary).blockHashLookup(blockHashLookup).contextVariables(contextVariablesBuilder.build()).accessListWarmAddresses(addressList).accessListWarmStorage(storageList);
        final MessageFrame initialFrame;
        if (transaction.isContractCreation()) {
            final Address contractAddress = Address.contractAddress(senderAddress, senderMutableAccount.getNonce() - 1L);
            final Bytes initCodeBytes = transaction.getPayload();
            initialFrame = commonMessageFrameBuilder.type(MessageFrame.Type.CONTRACT_CREATION).address(contractAddress).contract(contractAddress).inputData(Bytes.EMPTY).code(contractCreationProcessor.getCodeFromEVM(Hash.hash(initCodeBytes), initCodeBytes)).build();
        } else {
            // isContractCall tests isPresent
            @SuppressWarnings("OptionalGetWithoutIsPresent") final Address to = transaction.getTo().get();
            final Optional<Account> maybeContract = Optional.ofNullable(worldState.get(to));
            initialFrame = commonMessageFrameBuilder.type(MessageFrame.Type.MESSAGE_CALL).address(to).contract(to).inputData(transaction.getPayload()).code(maybeContract.map(c -> messageCallProcessor.getCodeFromEVM(c.getCodeHash(), c.getCode())).orElse(Code.EMPTY_CODE)).build();
        }
        messageFrameStack.addFirst(initialFrame);
        while (!messageFrameStack.isEmpty()) {
            process(messageFrameStack.peekFirst(), operationTracer);
        }
        if (initialFrame.getState() == MessageFrame.State.COMPLETED_SUCCESS) {
            worldUpdater.commit();
        }
        if (LOG.isTraceEnabled()) {
            LOG.trace("Gas used by transaction: {}, by message call/contract creation: {}", transaction.getGasLimit() - initialFrame.getRemainingGas(), gasAvailable - initialFrame.getRemainingGas());
        }
        // Refund the sender by what we should and pay the miner fee (note that we're doing them one
        // after the other so that if it is the same account somehow, we end up with the right result)
        final long selfDestructRefund = gasCalculator.getSelfDestructRefundAmount() * initialFrame.getSelfDestructs().size();
        final long refundGas = initialFrame.getGasRefund() + selfDestructRefund;
        final long refunded = refunded(transaction, initialFrame.getRemainingGas(), refundGas);
        final Wei refundedWei = transactionGasPrice.multiply(refunded);
        senderMutableAccount.incrementBalance(refundedWei);
        final long gasUsedByTransaction = transaction.getGasLimit() - initialFrame.getRemainingGas();
        if (!worldState.getClass().equals(GoQuorumMutablePrivateWorldStateUpdater.class)) {
            // if this is not a private GoQuorum transaction we have to update the coinbase
            final var coinbase = worldState.getOrCreate(miningBeneficiary).getMutable();
            final long coinbaseFee = transaction.getGasLimit() - refunded;
            if (blockHeader.getBaseFee().isPresent()) {
                final Wei baseFee = blockHeader.getBaseFee().get();
                if (transactionGasPrice.compareTo(baseFee) < 0) {
                    return TransactionProcessingResult.failed(gasUsedByTransaction, refunded, ValidationResult.invalid(TransactionInvalidReason.TRANSACTION_PRICE_TOO_LOW, "transaction price must be greater than base fee"), Optional.empty());
                }
            }
            final CoinbaseFeePriceCalculator coinbaseCalculator = blockHeader.getBaseFee().isPresent() ? coinbaseFeePriceCalculator : CoinbaseFeePriceCalculator.frontier();
            final Wei coinbaseWeiDelta = coinbaseCalculator.price(coinbaseFee, transactionGasPrice, blockHeader.getBaseFee());
            coinbase.incrementBalance(coinbaseWeiDelta);
        }
        initialFrame.getSelfDestructs().forEach(worldState::deleteAccount);
        if (clearEmptyAccounts) {
            clearEmptyAccounts(worldState);
        }
        if (initialFrame.getState() == MessageFrame.State.COMPLETED_SUCCESS) {
            return TransactionProcessingResult.successful(initialFrame.getLogs(), gasUsedByTransaction, refunded, initialFrame.getOutputData(), validationResult);
        } else {
            return TransactionProcessingResult.failed(gasUsedByTransaction, refunded, validationResult, initialFrame.getRevertReason());
        }
    } catch (final RuntimeException re) {
        LOG.error("Critical Exception Processing Transaction", re);
        return TransactionProcessingResult.invalid(ValidationResult.invalid(TransactionInvalidReason.INTERNAL_ERROR, "Internal Error in Besu - " + re));
    }
}
Also used : EvmAccount(org.hyperledger.besu.evm.account.EvmAccount) KEY_TRANSACTION_HASH(org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_TRANSACTION_HASH) WorldUpdater(org.hyperledger.besu.evm.worldstate.WorldUpdater) Account(org.hyperledger.besu.evm.account.Account) AccessListEntry(org.hyperledger.besu.evm.AccessListEntry) LoggerFactory(org.slf4j.LoggerFactory) FeeMarket(org.hyperledger.besu.ethereum.mainnet.feemarket.FeeMarket) OperationTracer(org.hyperledger.besu.evm.tracing.OperationTracer) GoQuorumMutablePrivateWorldStateUpdater(org.hyperledger.besu.ethereum.worldstate.GoQuorumMutablePrivateWorldStateUpdater) Bytes(org.apache.tuweni.bytes.Bytes) KEY_PRIVATE_METADATA_UPDATER(org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_PRIVATE_METADATA_UPDATER) Deque(java.util.Deque) Multimap(com.google.common.collect.Multimap) Address(org.hyperledger.besu.datatypes.Address) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) AbstractMessageProcessor(org.hyperledger.besu.evm.processor.AbstractMessageProcessor) HashMultimap(com.google.common.collect.HashMultimap) Wei(org.hyperledger.besu.datatypes.Wei) TransactionInvalidReason(org.hyperledger.besu.ethereum.transaction.TransactionInvalidReason) Code(org.hyperledger.besu.evm.Code) Bytes32(org.apache.tuweni.bytes.Bytes32) ProcessableBlockHeader(org.hyperledger.besu.ethereum.core.ProcessableBlockHeader) PrivateMetadataUpdater(org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater) KEY_IS_PERSISTING_PRIVATE_STATE(org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_IS_PERSISTING_PRIVATE_STATE) Logger(org.slf4j.Logger) ImmutableMap(com.google.common.collect.ImmutableMap) Blockchain(org.hyperledger.besu.ethereum.chain.Blockchain) CoinbaseFeePriceCalculator(org.hyperledger.besu.ethereum.core.feemarket.CoinbaseFeePriceCalculator) Set(java.util.Set) BlockHashLookup(org.hyperledger.besu.ethereum.vm.BlockHashLookup) TransactionProcessingResult(org.hyperledger.besu.ethereum.processing.TransactionProcessingResult) GasCalculator(org.hyperledger.besu.evm.gascalculator.GasCalculator) List(java.util.List) KEY_TRANSACTION(org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_TRANSACTION) MutableAccount(org.hyperledger.besu.evm.account.MutableAccount) Optional(java.util.Optional) MessageFrame(org.hyperledger.besu.evm.frame.MessageFrame) ArrayDeque(java.util.ArrayDeque) Transaction(org.hyperledger.besu.ethereum.core.Transaction) Hash(org.hyperledger.besu.datatypes.Hash) EvmAccount(org.hyperledger.besu.evm.account.EvmAccount) Account(org.hyperledger.besu.evm.account.Account) MutableAccount(org.hyperledger.besu.evm.account.MutableAccount) Address(org.hyperledger.besu.datatypes.Address) MessageFrame(org.hyperledger.besu.evm.frame.MessageFrame) Bytes32(org.apache.tuweni.bytes.Bytes32) Bytes(org.apache.tuweni.bytes.Bytes) AccessListEntry(org.hyperledger.besu.evm.AccessListEntry) EvmAccount(org.hyperledger.besu.evm.account.EvmAccount) TransactionInvalidReason(org.hyperledger.besu.ethereum.transaction.TransactionInvalidReason) MutableAccount(org.hyperledger.besu.evm.account.MutableAccount) HashSet(java.util.HashSet) CoinbaseFeePriceCalculator(org.hyperledger.besu.ethereum.core.feemarket.CoinbaseFeePriceCalculator) WorldUpdater(org.hyperledger.besu.evm.worldstate.WorldUpdater) GoQuorumMutablePrivateWorldStateUpdater(org.hyperledger.besu.ethereum.worldstate.GoQuorumMutablePrivateWorldStateUpdater) ArrayDeque(java.util.ArrayDeque) ImmutableMap(com.google.common.collect.ImmutableMap) Wei(org.hyperledger.besu.datatypes.Wei)

Example 4 with PrivateMetadataUpdater

use of org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater in project besu by hyperledger.

the class FlexiblePrivacyPrecompiledContract method computePrecompile.

@Nonnull
@Override
public PrecompileContractResult computePrecompile(final Bytes input, @Nonnull final MessageFrame messageFrame) {
    if (skipContractExecution(messageFrame)) {
        return NO_RESULT;
    }
    if (input == null || (input.size() != 32 && input.size() != 64)) {
        LOG.error("Can not fetch private transaction payload with key of invalid length {}", input);
        return NO_RESULT;
    }
    final Hash pmtHash = messageFrame.getContextVariable(KEY_TRANSACTION_HASH);
    final String key = input.slice(0, 32).toBase64String();
    final ReceiveResponse receiveResponse;
    try {
        receiveResponse = getReceiveResponse(key);
    } catch (final EnclaveClientException e) {
        LOG.debug("Can not fetch private transaction payload with key {}", key, e);
        return NO_RESULT;
    }
    final BytesValueRLPInput bytesValueRLPInput = new BytesValueRLPInput(Bytes.wrap(Base64.getDecoder().decode(receiveResponse.getPayload())), false);
    final VersionedPrivateTransaction versionedPrivateTransaction = VersionedPrivateTransaction.readFrom(bytesValueRLPInput);
    final PrivateTransaction privateTransaction = versionedPrivateTransaction.getPrivateTransaction();
    final Bytes privateFrom = privateTransaction.getPrivateFrom();
    if (!privateFromMatchesSenderKey(privateFrom, receiveResponse.getSenderKey())) {
        return NO_RESULT;
    }
    final Optional<Bytes> maybeGroupId = privateTransaction.getPrivacyGroupId();
    if (maybeGroupId.isEmpty()) {
        return NO_RESULT;
    }
    final Bytes32 privacyGroupId = Bytes32.wrap(maybeGroupId.get());
    LOG.debug("Processing private transaction {} in privacy group {}", pmtHash, privacyGroupId);
    final ProcessableBlockHeader currentBlockHeader = (ProcessableBlockHeader) messageFrame.getBlockValues();
    final PrivateMetadataUpdater privateMetadataUpdater = messageFrame.getContextVariable(KEY_PRIVATE_METADATA_UPDATER);
    final Hash lastRootHash = privateStateRootResolver.resolveLastStateRoot(privacyGroupId, privateMetadataUpdater);
    final MutableWorldState disposablePrivateState = privateWorldStateArchive.getMutable(fromPlugin(lastRootHash), null).get();
    final WorldUpdater privateWorldStateUpdater = disposablePrivateState.updater();
    maybeApplyGenesisToPrivateWorldState(lastRootHash, disposablePrivateState, privateWorldStateUpdater, privacyGroupId, currentBlockHeader.getNumber());
    if (!canExecute(messageFrame, currentBlockHeader, privateTransaction, versionedPrivateTransaction.getVersion(), privacyGroupId, disposablePrivateState, privateWorldStateUpdater, privateFrom)) {
        return NO_RESULT;
    }
    final TransactionProcessingResult result = processPrivateTransaction(messageFrame, privateTransaction, privacyGroupId, privateWorldStateUpdater);
    if (result.isInvalid() || !result.isSuccessful()) {
        LOG.error("Failed to process private transaction {}: {}", pmtHash, result.getValidationResult().getErrorMessage());
        privateMetadataUpdater.putTransactionReceipt(pmtHash, new PrivateTransactionReceipt(result));
        return NO_RESULT;
    }
    sendParticipantRemovedEvent(privateTransaction);
    if (messageFrame.getContextVariable(KEY_IS_PERSISTING_PRIVATE_STATE, false)) {
        privateWorldStateUpdater.commit();
        disposablePrivateState.persist(null);
        storePrivateMetadata(pmtHash, privacyGroupId, disposablePrivateState, privateMetadataUpdater, result);
    }
    return new PrecompileContractResult(result.getOutput(), true, MessageFrame.State.CODE_EXECUTING, Optional.empty());
}
Also used : PrivateTransaction(org.hyperledger.besu.ethereum.privacy.PrivateTransaction) VersionedPrivateTransaction(org.hyperledger.besu.ethereum.privacy.VersionedPrivateTransaction) MutableWorldState(org.hyperledger.besu.ethereum.core.MutableWorldState) ReceiveResponse(org.hyperledger.besu.enclave.types.ReceiveResponse) WorldUpdater(org.hyperledger.besu.evm.worldstate.WorldUpdater) PrivateTransactionReceipt(org.hyperledger.besu.ethereum.privacy.PrivateTransactionReceipt) Hash(org.hyperledger.besu.plugin.data.Hash) VersionedPrivateTransaction(org.hyperledger.besu.ethereum.privacy.VersionedPrivateTransaction) Bytes32(org.apache.tuweni.bytes.Bytes32) TransactionProcessingResult(org.hyperledger.besu.ethereum.processing.TransactionProcessingResult) Bytes(org.apache.tuweni.bytes.Bytes) ProcessableBlockHeader(org.hyperledger.besu.ethereum.core.ProcessableBlockHeader) EnclaveClientException(org.hyperledger.besu.enclave.EnclaveClientException) BytesValueRLPInput(org.hyperledger.besu.ethereum.rlp.BytesValueRLPInput) PrivateMetadataUpdater(org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater) Nonnull(javax.annotation.Nonnull)

Example 5 with PrivateMetadataUpdater

use of org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater in project besu by hyperledger.

the class PrivacyBlockProcessor method processBlock.

@Override
public Result processBlock(final Blockchain blockchain, final MutableWorldState worldState, final BlockHeader blockHeader, final List<Transaction> transactions, final List<BlockHeader> ommers, final PrivateMetadataUpdater privateMetadataUpdater) {
    if (privateMetadataUpdater != null) {
        throw new IllegalArgumentException("PrivateMetadataUpdater passed in is not null.");
    }
    maybeRehydrate(blockchain, blockHeader, transactions);
    final PrivateMetadataUpdater metadataUpdater = new PrivateMetadataUpdater(blockHeader, privateStateStorage);
    final Result result = blockProcessor.processBlock(blockchain, worldState, blockHeader, transactions, ommers, metadataUpdater);
    metadataUpdater.commit();
    return result;
}
Also used : PrivateMetadataUpdater(org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater)

Aggregations

PrivateMetadataUpdater (org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater)11 WorldUpdater (org.hyperledger.besu.evm.worldstate.WorldUpdater)8 Bytes32 (org.apache.tuweni.bytes.Bytes32)7 MutableWorldState (org.hyperledger.besu.ethereum.core.MutableWorldState)7 TransactionProcessingResult (org.hyperledger.besu.ethereum.processing.TransactionProcessingResult)5 MessageFrame (org.hyperledger.besu.evm.frame.MessageFrame)5 Bytes (org.apache.tuweni.bytes.Bytes)4 Hash (org.hyperledger.besu.datatypes.Hash)4 Block (org.hyperledger.besu.ethereum.core.Block)4 BlockDataGenerator (org.hyperledger.besu.ethereum.core.BlockDataGenerator)4 Before (org.junit.Before)4 Nonnull (javax.annotation.Nonnull)3 ProcessableBlockHeader (org.hyperledger.besu.ethereum.core.ProcessableBlockHeader)3 PrivateTransaction (org.hyperledger.besu.ethereum.privacy.PrivateTransaction)3 ArrayList (java.util.ArrayList)2 Optional (java.util.Optional)2 Address (org.hyperledger.besu.datatypes.Address)2 EnclaveClientException (org.hyperledger.besu.enclave.EnclaveClientException)2 ReceiveResponse (org.hyperledger.besu.enclave.types.ReceiveResponse)2 Blockchain (org.hyperledger.besu.ethereum.chain.Blockchain)2