mirror of https://github.com/hyperledger/besu
5561migrate-tests-to-Junit5
commit
2d350cf7f3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,95 +1,5 @@ |
|||||||
{ |
{ |
||||||
"request": { |
"request" : {"jsonrpc":"2.0","id":5,"method":"engine_forkchoiceUpdatedV3","params":[{"headBlockHash":"0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf","safeBlockHash":"0x0000000000000000000000000000000000000000000000000000000000000000","finalizedBlockHash":"0x0000000000000000000000000000000000000000000000000000000000000000"},{"timestamp":"0x1236","prevRandao":"0xc13da06dc53836ca0766057413b9683eb9a8773bbb8fcc5691e41c25b56dda1d","suggestedFeeRecipient":"0x0000000000000000000000000000000000000000","withdrawals":[{"index":"0xb","validatorIndex":"0x0","address":"0x0000000000000000000000000000000000000000","amount":"0x64"},{"index":"0xc","validatorIndex":"0x1","address":"0x0100000000000000000000000000000000000000","amount":"0x64"},{"index":"0xd","validatorIndex":"0x2","address":"0x0200000000000000000000000000000000000000","amount":"0x64"},{"index":"0xe","validatorIndex":"0x3","address":"0x0300000000000000000000000000000000000000","amount":"0x64"},{"index":"0xf","validatorIndex":"0x4","address":"0x0400000000000000000000000000000000000000","amount":"0x64"},{"index":"0x10","validatorIndex":"0x5","address":"0x0500000000000000000000000000000000000000","amount":"0x64"},{"index":"0x11","validatorIndex":"0x6","address":"0x0600000000000000000000000000000000000000","amount":"0x64"},{"index":"0x12","validatorIndex":"0x7","address":"0x0700000000000000000000000000000000000000","amount":"0x64"},{"index":"0x13","validatorIndex":"0x8","address":"0x0800000000000000000000000000000000000000","amount":"0x64"},{"index":"0x14","validatorIndex":"0x9","address":"0x0900000000000000000000000000000000000000","amount":"0x64"}],"parentBeaconBlockRoot":"0x062367f0b23e2d49ad5e770d9ad17b83c0c1c625c3f9a290cd9572b3fc6cfc9e"}]}, |
||||||
"jsonrpc": "2.0", |
"response" : {"jsonrpc":"2.0","id":5,"result":{"payloadStatus":{"status":"VALID","latestValidHash":"0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf","validationError":null},"payloadId":"0x29e12df730769ab6"}}, |
||||||
"id": 1, |
|
||||||
"method": "engine_forkchoiceUpdatedV3", |
|
||||||
"params": [ |
|
||||||
{ |
|
||||||
"headBlockHash": "0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf", |
|
||||||
"safeBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", |
|
||||||
"finalizedBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"timestamp": "0x1235", |
|
||||||
"prevRandao": "0x31a3b9b03c64172b39b7fa7d35d86eaa0f9cbac30e2abbf9895a32b80ae1cd76", |
|
||||||
"suggestedFeeRecipient": "0x0000000000000000000000000000000000000000", |
|
||||||
"withdrawals": [ |
|
||||||
{ |
|
||||||
"index": "0x1", |
|
||||||
"validatorIndex": "0x0", |
|
||||||
"address": "0x0000000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x2", |
|
||||||
"validatorIndex": "0x1", |
|
||||||
"address": "0x0100000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x3", |
|
||||||
"validatorIndex": "0x2", |
|
||||||
"address": "0x0200000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x4", |
|
||||||
"validatorIndex": "0x3", |
|
||||||
"address": "0x0300000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x5", |
|
||||||
"validatorIndex": "0x4", |
|
||||||
"address": "0x0400000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x6", |
|
||||||
"validatorIndex": "0x5", |
|
||||||
"address": "0x0500000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x7", |
|
||||||
"validatorIndex": "0x6", |
|
||||||
"address": "0x0600000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x8", |
|
||||||
"validatorIndex": "0x7", |
|
||||||
"address": "0x0700000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0x9", |
|
||||||
"validatorIndex": "0x8", |
|
||||||
"address": "0x0800000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"index": "0xa", |
|
||||||
"validatorIndex": "0x9", |
|
||||||
"address": "0x0900000000000000000000000000000000000000", |
|
||||||
"amount": "0x64" |
|
||||||
} |
|
||||||
], |
|
||||||
"parentBeaconBlockRoot": "0x169630f535b4a41330164c6e5c92b1224c0c407f582d407d0ac3d206cd32fd52" |
|
||||||
} |
|
||||||
] |
|
||||||
}, |
|
||||||
"response": { |
|
||||||
"jsonrpc": "2.0", |
|
||||||
"id": 1, |
|
||||||
"result": { |
|
||||||
"payloadStatus": { |
|
||||||
"status": "VALID", |
|
||||||
"latestValidHash": "0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf", |
|
||||||
"validationError": null |
|
||||||
}, |
|
||||||
"payloadId": "0x78d3b312ed5adeb5" |
|
||||||
} |
|
||||||
}, |
|
||||||
"statusCode" : 200 |
"statusCode" : 200 |
||||||
} |
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,111 @@ |
|||||||
|
/* |
||||||
|
* Copyright contributors to Hyperledger Besu. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||||
|
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||||
|
* specific language governing permissions and limitations under the License. |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
package org.hyperledger.besu.cli.options.stable; |
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat; |
||||||
|
import static org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration.Unstable.MINIMUM_BONSAI_TRIE_LOG_RETENTION_THRESHOLD; |
||||||
|
|
||||||
|
import org.hyperledger.besu.cli.options.AbstractCLIOptionsTest; |
||||||
|
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration; |
||||||
|
import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat; |
||||||
|
import org.hyperledger.besu.ethereum.worldstate.ImmutableDataStorageConfiguration; |
||||||
|
|
||||||
|
import org.junit.Test; |
||||||
|
|
||||||
|
public class DataStorageOptionsTest |
||||||
|
extends AbstractCLIOptionsTest<DataStorageConfiguration, DataStorageOptions> { |
||||||
|
|
||||||
|
@Test |
||||||
|
public void bonsaiTrieLogPruningLimitOption() { |
||||||
|
internalTestSuccess( |
||||||
|
dataStorageConfiguration -> |
||||||
|
assertThat(dataStorageConfiguration.getUnstable().getBonsaiTrieLogPruningLimit()) |
||||||
|
.isEqualTo(1), |
||||||
|
"--Xbonsai-trie-log-pruning-enabled", |
||||||
|
"--Xbonsai-trie-log-pruning-limit", |
||||||
|
"1"); |
||||||
|
} |
||||||
|
|
||||||
|
@Test |
||||||
|
public void bonsaiTrieLogPruningLimitShouldBePositive() { |
||||||
|
internalTestFailure( |
||||||
|
"--Xbonsai-trie-log-pruning-limit=0 must be greater than 0", |
||||||
|
"--Xbonsai-trie-log-pruning-enabled", |
||||||
|
"--Xbonsai-trie-log-pruning-limit", |
||||||
|
"0"); |
||||||
|
} |
||||||
|
|
||||||
|
@Test |
||||||
|
public void bonsaiTrieLogRetentionThresholdOption() { |
||||||
|
internalTestSuccess( |
||||||
|
dataStorageConfiguration -> |
||||||
|
assertThat(dataStorageConfiguration.getUnstable().getBonsaiTrieLogRetentionThreshold()) |
||||||
|
.isEqualTo(MINIMUM_BONSAI_TRIE_LOG_RETENTION_THRESHOLD + 1), |
||||||
|
"--Xbonsai-trie-log-pruning-enabled", |
||||||
|
"--Xbonsai-trie-log-retention-threshold", |
||||||
|
"513"); |
||||||
|
} |
||||||
|
|
||||||
|
@Test |
||||||
|
public void bonsaiTrieLogRetentionThresholdOption_boundaryTest() { |
||||||
|
internalTestSuccess( |
||||||
|
dataStorageConfiguration -> |
||||||
|
assertThat(dataStorageConfiguration.getUnstable().getBonsaiTrieLogRetentionThreshold()) |
||||||
|
.isEqualTo(MINIMUM_BONSAI_TRIE_LOG_RETENTION_THRESHOLD), |
||||||
|
"--Xbonsai-trie-log-pruning-enabled", |
||||||
|
"--Xbonsai-trie-log-retention-threshold", |
||||||
|
"512"); |
||||||
|
} |
||||||
|
|
||||||
|
@Test |
||||||
|
public void bonsaiTrieLogRetentionThresholdShouldBeAboveMinimum() { |
||||||
|
internalTestFailure( |
||||||
|
"--Xbonsai-trie-log-retention-threshold minimum value is 512", |
||||||
|
"--Xbonsai-trie-log-pruning-enabled", |
||||||
|
"--Xbonsai-trie-log-retention-threshold", |
||||||
|
"511"); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected DataStorageConfiguration createDefaultDomainObject() { |
||||||
|
return DataStorageConfiguration.DEFAULT_CONFIG; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected DataStorageConfiguration createCustomizedDomainObject() { |
||||||
|
return ImmutableDataStorageConfiguration.builder() |
||||||
|
.dataStorageFormat(DataStorageFormat.BONSAI) |
||||||
|
.bonsaiMaxLayersToLoad(100L) |
||||||
|
.unstable( |
||||||
|
ImmutableDataStorageConfiguration.Unstable.builder() |
||||||
|
.bonsaiTrieLogPruningEnabled(true) |
||||||
|
.bonsaiTrieLogRetentionThreshold(1000L) |
||||||
|
.bonsaiTrieLogPruningLimit(20) |
||||||
|
.build()) |
||||||
|
.build(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected DataStorageOptions optionsFromDomainObject( |
||||||
|
final DataStorageConfiguration domainObject) { |
||||||
|
return DataStorageOptions.fromConfig(domainObject); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected DataStorageOptions getOptionsFromBesuCommand(final TestBesuCommand besuCommand) { |
||||||
|
return besuCommand.getDataStorageOptions(); |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,84 @@ |
|||||||
|
/* |
||||||
|
* Copyright Hyperledger Besu. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||||
|
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||||
|
* specific language governing permissions and limitations under the License. |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods; |
||||||
|
|
||||||
|
import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.BLOCK_NOT_FOUND; |
||||||
|
import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.INTERNAL_ERROR; |
||||||
|
|
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.JsonCallParameter; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse; |
||||||
|
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries; |
||||||
|
import org.hyperledger.besu.ethereum.core.BlockHeader; |
||||||
|
import org.hyperledger.besu.ethereum.debug.TraceOptions; |
||||||
|
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule; |
||||||
|
import org.hyperledger.besu.ethereum.transaction.PreCloseStateHandler; |
||||||
|
import org.hyperledger.besu.ethereum.transaction.TransactionSimulator; |
||||||
|
import org.hyperledger.besu.ethereum.vm.DebugOperationTracer; |
||||||
|
|
||||||
|
import java.util.Optional; |
||||||
|
|
||||||
|
import org.slf4j.Logger; |
||||||
|
import org.slf4j.LoggerFactory; |
||||||
|
|
||||||
|
public abstract class AbstractTraceCall extends AbstractTraceByBlock { |
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractTraceCall.class); |
||||||
|
|
||||||
|
public AbstractTraceCall( |
||||||
|
final BlockchainQueries blockchainQueries, |
||||||
|
final ProtocolSchedule protocolSchedule, |
||||||
|
final TransactionSimulator transactionSimulator) { |
||||||
|
super(blockchainQueries, protocolSchedule, transactionSimulator); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected Object resultByBlockNumber( |
||||||
|
final JsonRpcRequestContext requestContext, final long blockNumber) { |
||||||
|
final JsonCallParameter callParams = |
||||||
|
JsonCallParameterUtil.validateAndGetCallParams(requestContext); |
||||||
|
final TraceOptions traceOptions = getTraceOptions(requestContext); |
||||||
|
final String blockNumberString = String.valueOf(blockNumber); |
||||||
|
LOG.atTrace() |
||||||
|
.setMessage("Received RPC rpcName={} callParams={} block={} traceTypes={}") |
||||||
|
.addArgument(this::getName) |
||||||
|
.addArgument(callParams) |
||||||
|
.addArgument(blockNumberString) |
||||||
|
.addArgument(traceOptions) |
||||||
|
.log(); |
||||||
|
|
||||||
|
final Optional<BlockHeader> maybeBlockHeader = |
||||||
|
blockchainQueriesSupplier.get().getBlockHeaderByNumber(blockNumber); |
||||||
|
|
||||||
|
if (maybeBlockHeader.isEmpty()) { |
||||||
|
return new JsonRpcErrorResponse(requestContext.getRequest().getId(), BLOCK_NOT_FOUND); |
||||||
|
} |
||||||
|
|
||||||
|
final DebugOperationTracer tracer = new DebugOperationTracer(traceOptions); |
||||||
|
return transactionSimulator |
||||||
|
.process( |
||||||
|
callParams, |
||||||
|
buildTransactionValidationParams(), |
||||||
|
tracer, |
||||||
|
getSimulatorResultHandler(requestContext, tracer), |
||||||
|
maybeBlockHeader.get()) |
||||||
|
.orElseGet( |
||||||
|
() -> new JsonRpcErrorResponse(requestContext.getRequest().getId(), INTERNAL_ERROR)); |
||||||
|
} |
||||||
|
|
||||||
|
protected abstract TraceOptions getTraceOptions(final JsonRpcRequestContext requestContext); |
||||||
|
|
||||||
|
protected abstract PreCloseStateHandler<Object> getSimulatorResultHandler( |
||||||
|
final JsonRpcRequestContext requestContext, final DebugOperationTracer tracer); |
||||||
|
} |
@ -0,0 +1,91 @@ |
|||||||
|
/* |
||||||
|
* Copyright Hyperledger Besu. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||||
|
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||||
|
* specific language governing permissions and limitations under the License. |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods; |
||||||
|
|
||||||
|
import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType.INTERNAL_ERROR; |
||||||
|
|
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.BlockParameter; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.TransactionTraceParams; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.processor.TransactionTrace; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcError; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse; |
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.DebugTraceTransactionResult; |
||||||
|
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries; |
||||||
|
import org.hyperledger.besu.ethereum.debug.TraceOptions; |
||||||
|
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule; |
||||||
|
import org.hyperledger.besu.ethereum.transaction.PreCloseStateHandler; |
||||||
|
import org.hyperledger.besu.ethereum.transaction.TransactionSimulator; |
||||||
|
import org.hyperledger.besu.ethereum.vm.DebugOperationTracer; |
||||||
|
|
||||||
|
import java.util.Optional; |
||||||
|
|
||||||
|
import org.slf4j.Logger; |
||||||
|
import org.slf4j.LoggerFactory; |
||||||
|
|
||||||
|
public class DebugTraceCall extends AbstractTraceCall { |
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(DebugTraceCall.class); |
||||||
|
|
||||||
|
public DebugTraceCall( |
||||||
|
final BlockchainQueries blockchainQueries, |
||||||
|
final ProtocolSchedule protocolSchedule, |
||||||
|
final TransactionSimulator transactionSimulator) { |
||||||
|
super(blockchainQueries, protocolSchedule, transactionSimulator); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String getName() { |
||||||
|
return RpcMethod.DEBUG_TRACE_CALL.getMethodName(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected TraceOptions getTraceOptions(final JsonRpcRequestContext requestContext) { |
||||||
|
return requestContext |
||||||
|
.getOptionalParameter(2, TransactionTraceParams.class) |
||||||
|
.map(TransactionTraceParams::traceOptions) |
||||||
|
.orElse(TraceOptions.DEFAULT); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected BlockParameter blockParameter(final JsonRpcRequestContext request) { |
||||||
|
final Optional<BlockParameter> maybeBlockParameter = |
||||||
|
request.getOptionalParameter(1, BlockParameter.class); |
||||||
|
|
||||||
|
return maybeBlockParameter.orElse(BlockParameter.LATEST); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected PreCloseStateHandler<Object> getSimulatorResultHandler( |
||||||
|
final JsonRpcRequestContext requestContext, final DebugOperationTracer tracer) { |
||||||
|
return (mutableWorldState, maybeSimulatorResult) -> |
||||||
|
maybeSimulatorResult.map( |
||||||
|
result -> { |
||||||
|
if (result.isInvalid()) { |
||||||
|
LOG.error("Invalid simulator result {}", result); |
||||||
|
final JsonRpcError error = |
||||||
|
new JsonRpcError( |
||||||
|
INTERNAL_ERROR, result.getValidationResult().getErrorMessage()); |
||||||
|
return new JsonRpcErrorResponse(requestContext.getRequest().getId(), error); |
||||||
|
} |
||||||
|
|
||||||
|
final TransactionTrace transactionTrace = |
||||||
|
new TransactionTrace( |
||||||
|
result.getTransaction(), result.getResult(), tracer.getTraceFrames()); |
||||||
|
|
||||||
|
return new DebugTraceTransactionResult(transactionTrace); |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
/* |
||||||
|
* Copyright contributors to Hyperledger Besu. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||||
|
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||||
|
* specific language governing permissions and limitations under the License. |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
package org.hyperledger.besu.ethereum.api.jsonrpc.bonsai; |
||||||
|
|
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; |
||||||
|
import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; |
||||||
|
import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat; |
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach; |
||||||
|
|
||||||
|
public class DebugTraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { |
||||||
|
|
||||||
|
@Override |
||||||
|
@BeforeEach |
||||||
|
public void setup() throws Exception { |
||||||
|
setupBonsaiBlockchain(); |
||||||
|
startService(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected BlockchainSetupUtil getBlockchainSetupUtil(final DataStorageFormat storageFormat) { |
||||||
|
return createBlockchainSetupUtil( |
||||||
|
"trace/chain-data/genesis.json", "trace/chain-data/blocks.bin", storageFormat); |
||||||
|
} |
||||||
|
|
||||||
|
public static Object[][] specs() { |
||||||
|
return AbstractJsonRpcHttpBySpecTest.findSpecFiles(new String[] {"debug/trace-call"}); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
/* |
||||||
|
* Copyright contributors to Hyperledger Besu. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||||
|
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||||
|
* specific language governing permissions and limitations under the License. |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
package org.hyperledger.besu.ethereum.api.jsonrpc.forest; |
||||||
|
|
||||||
|
import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; |
||||||
|
import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; |
||||||
|
import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat; |
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach; |
||||||
|
|
||||||
|
public class DebugTraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { |
||||||
|
|
||||||
|
@Override |
||||||
|
@BeforeEach |
||||||
|
public void setup() throws Exception { |
||||||
|
setupBlockchain(); |
||||||
|
startService(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected BlockchainSetupUtil getBlockchainSetupUtil(final DataStorageFormat storageFormat) { |
||||||
|
return createBlockchainSetupUtil( |
||||||
|
"trace/chain-data/genesis.json", "trace/chain-data/blocks.bin", storageFormat); |
||||||
|
} |
||||||
|
|
||||||
|
public static Object[][] specs() { |
||||||
|
return AbstractJsonRpcHttpBySpecTest.findSpecFiles(new String[] {"debug/trace-call"}); |
||||||
|
} |
||||||
|
} |
0
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/debug_batchSendRawTransaction_multipleTxMixedStatuses.json → ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/batch-send-raw-transaction/debug_batchSendRawTransaction_multipleTxMixedStatuses.json
0
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/debug_batchSendRawTransaction_multipleTxMixedStatuses.json → ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/batch-send-raw-transaction/debug_batchSendRawTransaction_multipleTxMixedStatuses.json
0
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/debug_batchSendRawTransaction_singleTxErrorInvalidSignatureV.json → ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/batch-send-raw-transaction/debug_batchSendRawTransaction_singleTxErrorInvalidSignatureV.json
0
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/debug_batchSendRawTransaction_singleTxErrorInvalidSignatureV.json → ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/batch-send-raw-transaction/debug_batchSendRawTransaction_singleTxErrorInvalidSignatureV.json
@ -0,0 +1,300 @@ |
|||||||
|
{ |
||||||
|
"request" : { |
||||||
|
"jsonrpc" : "2.0", |
||||||
|
"method" : "debug_traceCall", |
||||||
|
"params" : [ { |
||||||
|
"from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", |
||||||
|
"to" : "0x0050000000000000000000000000000000000000", |
||||||
|
"gas" : "0xfffff2", |
||||||
|
"gasPrice" : "0xef", |
||||||
|
"value" : "0x0", |
||||||
|
"data" : "0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001", |
||||||
|
"nonce" : "0x0" |
||||||
|
}, "latest", |
||||||
|
{ |
||||||
|
"disableMemory": true, "disableStack": true, "disableStorage": true |
||||||
|
} ], |
||||||
|
"id" : 1 |
||||||
|
}, |
||||||
|
"response": { |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"id": 1, |
||||||
|
"result": { |
||||||
|
"gas" : 22070, |
||||||
|
"failed" : false, |
||||||
|
"returnValue" : "f000000000000000000000000000000000000000000000000000000000000002", |
||||||
|
"structLogs" : [ { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755910, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755907, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 4, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755904, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "CALLDATASIZE", |
||||||
|
"gas" : 16755901, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 7, |
||||||
|
"op" : "SUB", |
||||||
|
"gas" : 16755899, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "DUP1", |
||||||
|
"gas" : 16755896, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755893, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755890, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "CALLDATACOPY", |
||||||
|
"gas" : 16755887, |
||||||
|
"gasCost" : 9, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 14, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755878, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 16, |
||||||
|
"op" : "CALLVALUE", |
||||||
|
"gas" : 16755875, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 17, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755873, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 19, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16755870, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 20, |
||||||
|
"op" : "GAS", |
||||||
|
"gas" : 16755867, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 21, |
||||||
|
"op" : "CALLCODE", |
||||||
|
"gas" : 16755865, |
||||||
|
"gasCost" : 700, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493366, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16493363, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 3, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493360, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 5, |
||||||
|
"op" : "ADD", |
||||||
|
"gas" : 16493357, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493354, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "MSTORE", |
||||||
|
"gas" : 16493351, |
||||||
|
"gasCost" : 6, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493345, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493342, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16493339, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 22, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755138, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 24, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755135, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 26, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16755132, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : null, |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
} ] |
||||||
|
} |
||||||
|
}, |
||||||
|
"statusCode": 200 |
||||||
|
} |
@ -0,0 +1,297 @@ |
|||||||
|
{ |
||||||
|
"request" : { |
||||||
|
"jsonrpc" : "2.0", |
||||||
|
"method" : "debug_traceCall", |
||||||
|
"params" : [ { |
||||||
|
"from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", |
||||||
|
"to" : "0x0050000000000000000000000000000000000000", |
||||||
|
"gas" : "0xfffff2", |
||||||
|
"gasPrice" : "0xef", |
||||||
|
"value" : "0x0", |
||||||
|
"data" : "0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001", |
||||||
|
"nonce" : "0x0" |
||||||
|
}, "latest" ], |
||||||
|
"id" : 1 |
||||||
|
}, |
||||||
|
"response": { |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"id": 1, |
||||||
|
"result": { |
||||||
|
"gas" : 22070, |
||||||
|
"failed" : false, |
||||||
|
"returnValue" : "f000000000000000000000000000000000000000000000000000000000000002", |
||||||
|
"structLogs" : [ { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755910, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755907, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 4, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755904, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "CALLDATASIZE", |
||||||
|
"gas" : 16755901, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 7, |
||||||
|
"op" : "SUB", |
||||||
|
"gas" : 16755899, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000040" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "DUP1", |
||||||
|
"gas" : 16755896, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755893, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755890, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "CALLDATACOPY", |
||||||
|
"gas" : 16755887, |
||||||
|
"gasCost" : 9, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 14, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755878, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 16, |
||||||
|
"op" : "CALLVALUE", |
||||||
|
"gas" : 16755875, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 17, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755873, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 19, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16755870, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 20, |
||||||
|
"op" : "GAS", |
||||||
|
"gas" : 16755867, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000030000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 21, |
||||||
|
"op" : "CALLCODE", |
||||||
|
"gas" : 16755865, |
||||||
|
"gasCost" : 700, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000030000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000ffac99" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493366, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16493363, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 3, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493360, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 5, |
||||||
|
"op" : "ADD", |
||||||
|
"gas" : 16493357, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493354, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "MSTORE", |
||||||
|
"gas" : 16493351, |
||||||
|
"gasCost" : 6, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000002", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493345, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493342, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16493339, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 22, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755138, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 24, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755135, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 26, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16755132, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
} ] |
||||||
|
} |
||||||
|
}, |
||||||
|
"statusCode": 200 |
||||||
|
} |
@ -0,0 +1,300 @@ |
|||||||
|
{ |
||||||
|
"request" : { |
||||||
|
"jsonrpc" : "2.0", |
||||||
|
"method" : "debug_traceCall", |
||||||
|
"params" : [ { |
||||||
|
"from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", |
||||||
|
"to" : "0x0050000000000000000000000000000000000000", |
||||||
|
"gas" : "0xfffff2", |
||||||
|
"gasPrice" : "0xef", |
||||||
|
"value" : "0x0", |
||||||
|
"data" : "0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001", |
||||||
|
"nonce" : "0x0" |
||||||
|
}, "latest", |
||||||
|
{ |
||||||
|
"disableMemory":true |
||||||
|
} ], |
||||||
|
"id" : 1 |
||||||
|
}, |
||||||
|
"response": { |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"id": 1, |
||||||
|
"result": { |
||||||
|
"gas" : 22070, |
||||||
|
"failed" : false, |
||||||
|
"returnValue" : "f000000000000000000000000000000000000000000000000000000000000002", |
||||||
|
"structLogs" : [ { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755910, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755907, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 4, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755904, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "CALLDATASIZE", |
||||||
|
"gas" : 16755901, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 7, |
||||||
|
"op" : "SUB", |
||||||
|
"gas" : 16755899, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000040" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "DUP1", |
||||||
|
"gas" : 16755896, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755893, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755890, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "CALLDATACOPY", |
||||||
|
"gas" : 16755887, |
||||||
|
"gasCost" : 9, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 14, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755878, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 16, |
||||||
|
"op" : "CALLVALUE", |
||||||
|
"gas" : 16755875, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 17, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755873, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 19, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16755870, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 20, |
||||||
|
"op" : "GAS", |
||||||
|
"gas" : 16755867, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000030000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 21, |
||||||
|
"op" : "CALLCODE", |
||||||
|
"gas" : 16755865, |
||||||
|
"gasCost" : 700, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000030000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000ffac99" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493366, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16493363, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 3, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493360, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 5, |
||||||
|
"op" : "ADD", |
||||||
|
"gas" : 16493357, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493354, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "MSTORE", |
||||||
|
"gas" : 16493351, |
||||||
|
"gasCost" : 6, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000002", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493345, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493342, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16493339, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 22, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755138, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 24, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755135, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 26, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16755132, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : null, |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
} ] |
||||||
|
} |
||||||
|
}, |
||||||
|
"statusCode": 200 |
||||||
|
} |
@ -0,0 +1,300 @@ |
|||||||
|
{ |
||||||
|
"request" : { |
||||||
|
"jsonrpc" : "2.0", |
||||||
|
"method" : "debug_traceCall", |
||||||
|
"params" : [ { |
||||||
|
"from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", |
||||||
|
"to" : "0x0050000000000000000000000000000000000000", |
||||||
|
"gas" : "0xfffff2", |
||||||
|
"gasPrice" : "0xef", |
||||||
|
"value" : "0x0", |
||||||
|
"data" : "0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001", |
||||||
|
"nonce" : "0x0" |
||||||
|
}, "latest", |
||||||
|
{ |
||||||
|
"disableStack": true |
||||||
|
} ], |
||||||
|
"id" : 1 |
||||||
|
}, |
||||||
|
"response": { |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"id": 1, |
||||||
|
"result": { |
||||||
|
"gas" : 22070, |
||||||
|
"failed" : false, |
||||||
|
"returnValue" : "f000000000000000000000000000000000000000000000000000000000000002", |
||||||
|
"structLogs" : [ { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755910, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755907, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 4, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755904, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "CALLDATASIZE", |
||||||
|
"gas" : 16755901, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 7, |
||||||
|
"op" : "SUB", |
||||||
|
"gas" : 16755899, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "DUP1", |
||||||
|
"gas" : 16755896, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755893, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755890, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "CALLDATACOPY", |
||||||
|
"gas" : 16755887, |
||||||
|
"gasCost" : 9, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 14, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755878, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 16, |
||||||
|
"op" : "CALLVALUE", |
||||||
|
"gas" : 16755875, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 17, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755873, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 19, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16755870, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 20, |
||||||
|
"op" : "GAS", |
||||||
|
"gas" : 16755867, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 21, |
||||||
|
"op" : "CALLCODE", |
||||||
|
"gas" : 16755865, |
||||||
|
"gasCost" : 700, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493366, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16493363, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 3, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493360, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 5, |
||||||
|
"op" : "ADD", |
||||||
|
"gas" : 16493357, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493354, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "MSTORE", |
||||||
|
"gas" : 16493351, |
||||||
|
"gasCost" : 6, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493345, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493342, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16493339, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 22, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755138, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 24, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755135, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 26, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16755132, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : null, |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : { }, |
||||||
|
"reason" : null |
||||||
|
} ] |
||||||
|
} |
||||||
|
}, |
||||||
|
"statusCode": 200 |
||||||
|
} |
@ -0,0 +1,300 @@ |
|||||||
|
{ |
||||||
|
"request" : { |
||||||
|
"jsonrpc" : "2.0", |
||||||
|
"method" : "debug_traceCall", |
||||||
|
"params" : [ { |
||||||
|
"from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", |
||||||
|
"to" : "0x0050000000000000000000000000000000000000", |
||||||
|
"gas" : "0xfffff2", |
||||||
|
"gasPrice" : "0xef", |
||||||
|
"value" : "0x0", |
||||||
|
"data" : "0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001", |
||||||
|
"nonce" : "0x0" |
||||||
|
}, "latest", |
||||||
|
{ |
||||||
|
"disableStorage": true |
||||||
|
} ], |
||||||
|
"id" : 1 |
||||||
|
}, |
||||||
|
"response": { |
||||||
|
"jsonrpc": "2.0", |
||||||
|
"id": 1, |
||||||
|
"result": { |
||||||
|
"gas" : 22070, |
||||||
|
"failed" : false, |
||||||
|
"returnValue" : "f000000000000000000000000000000000000000000000000000000000000002", |
||||||
|
"structLogs" : [ { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755910, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755907, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 4, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755904, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "CALLDATASIZE", |
||||||
|
"gas" : 16755901, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 7, |
||||||
|
"op" : "SUB", |
||||||
|
"gas" : 16755899, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000040" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "DUP1", |
||||||
|
"gas" : 16755896, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755893, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755890, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "CALLDATACOPY", |
||||||
|
"gas" : 16755887, |
||||||
|
"gasCost" : 9, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 14, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755878, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 16, |
||||||
|
"op" : "CALLVALUE", |
||||||
|
"gas" : 16755875, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 17, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755873, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 19, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16755870, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 20, |
||||||
|
"op" : "GAS", |
||||||
|
"gas" : 16755867, |
||||||
|
"gasCost" : 2, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000030000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 21, |
||||||
|
"op" : "CALLCODE", |
||||||
|
"gas" : 16755865, |
||||||
|
"gasCost" : 700, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000030000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000ffac99" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 0, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493366, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 2, |
||||||
|
"op" : "CALLDATALOAD", |
||||||
|
"gas" : 16493363, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 3, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493360, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 5, |
||||||
|
"op" : "ADD", |
||||||
|
"gas" : 16493357, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 6, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493354, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"memory" : [ ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 8, |
||||||
|
"op" : "MSTORE", |
||||||
|
"gas" : 16493351, |
||||||
|
"gasCost" : 6, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "f000000000000000000000000000000000000000000000000000000000000002", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 9, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493345, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 11, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16493342, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 13, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16493339, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 2, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 22, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755138, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 24, |
||||||
|
"op" : "PUSH1", |
||||||
|
"gas" : 16755135, |
||||||
|
"gasCost" : 3, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000020" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
}, { |
||||||
|
"pc" : 26, |
||||||
|
"op" : "RETURN", |
||||||
|
"gas" : 16755132, |
||||||
|
"gasCost" : 0, |
||||||
|
"depth" : 1, |
||||||
|
"stack" : [ "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000000" ], |
||||||
|
"memory" : [ "f000000000000000000000000000000000000000000000000000000000000002" ], |
||||||
|
"storage" : null, |
||||||
|
"reason" : null |
||||||
|
} ] |
||||||
|
} |
||||||
|
}, |
||||||
|
"statusCode": 200 |
||||||
|
} |
@ -0,0 +1,194 @@ |
|||||||
|
/* |
||||||
|
* Copyright contributors to Hyperledger Besu. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||||
|
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||||
|
* specific language governing permissions and limitations under the License. |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
package org.hyperledger.besu.ethereum.bonsai.trielog; |
||||||
|
|
||||||
|
import org.hyperledger.besu.datatypes.Hash; |
||||||
|
import org.hyperledger.besu.ethereum.bonsai.storage.BonsaiWorldStateKeyValueStorage; |
||||||
|
import org.hyperledger.besu.ethereum.chain.Blockchain; |
||||||
|
import org.hyperledger.besu.ethereum.core.BlockHeader; |
||||||
|
import org.hyperledger.besu.ethereum.core.ProcessableBlockHeader; |
||||||
|
|
||||||
|
import java.util.Comparator; |
||||||
|
import java.util.Optional; |
||||||
|
import java.util.concurrent.atomic.AtomicLong; |
||||||
|
import java.util.stream.Stream; |
||||||
|
|
||||||
|
import com.google.common.collect.ArrayListMultimap; |
||||||
|
import com.google.common.collect.Multimap; |
||||||
|
import com.google.common.collect.TreeMultimap; |
||||||
|
import org.apache.tuweni.bytes.Bytes32; |
||||||
|
import org.slf4j.Logger; |
||||||
|
import org.slf4j.LoggerFactory; |
||||||
|
|
||||||
|
public class TrieLogPruner { |
||||||
|
|
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(TrieLogPruner.class); |
||||||
|
|
||||||
|
private final int pruningLimit; |
||||||
|
private final int loadingLimit; |
||||||
|
private final BonsaiWorldStateKeyValueStorage rootWorldStateStorage; |
||||||
|
private final Blockchain blockchain; |
||||||
|
private final long numBlocksToRetain; |
||||||
|
private final boolean requireFinalizedBlock; |
||||||
|
|
||||||
|
private final Multimap<Long, Hash> trieLogBlocksAndForksByDescendingBlockNumber = |
||||||
|
TreeMultimap.create(Comparator.reverseOrder(), Comparator.naturalOrder()); |
||||||
|
|
||||||
|
public TrieLogPruner( |
||||||
|
final BonsaiWorldStateKeyValueStorage rootWorldStateStorage, |
||||||
|
final Blockchain blockchain, |
||||||
|
final long numBlocksToRetain, |
||||||
|
final int pruningLimit, |
||||||
|
final boolean requireFinalizedBlock) { |
||||||
|
this.rootWorldStateStorage = rootWorldStateStorage; |
||||||
|
this.blockchain = blockchain; |
||||||
|
this.numBlocksToRetain = numBlocksToRetain; |
||||||
|
this.pruningLimit = pruningLimit; |
||||||
|
this.loadingLimit = pruningLimit; // same as pruningLimit for now
|
||||||
|
this.requireFinalizedBlock = requireFinalizedBlock; |
||||||
|
} |
||||||
|
|
||||||
|
public void initialize() { |
||||||
|
preloadQueue(); |
||||||
|
} |
||||||
|
|
||||||
|
private void preloadQueue() { |
||||||
|
LOG.atInfo() |
||||||
|
.setMessage("Loading first {} trie logs from database...") |
||||||
|
.addArgument(loadingLimit) |
||||||
|
.log(); |
||||||
|
try (final Stream<byte[]> trieLogKeys = rootWorldStateStorage.streamTrieLogKeys(loadingLimit)) { |
||||||
|
final AtomicLong count = new AtomicLong(); |
||||||
|
trieLogKeys.forEach( |
||||||
|
blockHashAsBytes -> { |
||||||
|
final Hash blockHash = Hash.wrap(Bytes32.wrap(blockHashAsBytes)); |
||||||
|
final Optional<BlockHeader> header = blockchain.getBlockHeader(blockHash); |
||||||
|
if (header.isPresent()) { |
||||||
|
trieLogBlocksAndForksByDescendingBlockNumber.put(header.get().getNumber(), blockHash); |
||||||
|
count.getAndIncrement(); |
||||||
|
} else { |
||||||
|
// prune orphaned blocks (sometimes created during block production)
|
||||||
|
rootWorldStateStorage.pruneTrieLog(blockHash); |
||||||
|
} |
||||||
|
}); |
||||||
|
LOG.atInfo().log("Loaded {} trie logs from database", count); |
||||||
|
pruneFromQueue(); |
||||||
|
} catch (Exception e) { |
||||||
|
LOG.error("Error loading trie logs from database, nothing pruned", e); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void addToPruneQueue(final long blockNumber, final Hash blockHash) { |
||||||
|
LOG.atTrace() |
||||||
|
.setMessage("adding trie log to queue for later pruning blockNumber {}; blockHash {}") |
||||||
|
.addArgument(blockNumber) |
||||||
|
.addArgument(blockHash) |
||||||
|
.log(); |
||||||
|
trieLogBlocksAndForksByDescendingBlockNumber.put(blockNumber, blockHash); |
||||||
|
} |
||||||
|
|
||||||
|
int pruneFromQueue() { |
||||||
|
final long retainAboveThisBlock = blockchain.getChainHeadBlockNumber() - numBlocksToRetain; |
||||||
|
final Optional<Hash> finalized = blockchain.getFinalized(); |
||||||
|
if (requireFinalizedBlock && finalized.isEmpty()) { |
||||||
|
LOG.debug("No finalized block present, skipping pruning"); |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
final long retainAboveThisBlockOrFinalized = |
||||||
|
finalized |
||||||
|
.flatMap(blockchain::getBlockHeader) |
||||||
|
.map(ProcessableBlockHeader::getNumber) |
||||||
|
.map(finalizedBlock -> Math.min(finalizedBlock, retainAboveThisBlock)) |
||||||
|
.orElse(retainAboveThisBlock); |
||||||
|
|
||||||
|
LOG.atTrace() |
||||||
|
.setMessage( |
||||||
|
"min((chainHeadNumber: {} - numBlocksToRetain: {}) = {}, finalized: {})) = retainAboveThisBlockOrFinalized: {}") |
||||||
|
.addArgument(blockchain::getChainHeadBlockNumber) |
||||||
|
.addArgument(numBlocksToRetain) |
||||||
|
.addArgument(retainAboveThisBlock) |
||||||
|
.addArgument( |
||||||
|
() -> |
||||||
|
finalized |
||||||
|
.flatMap(blockchain::getBlockHeader) |
||||||
|
.map(ProcessableBlockHeader::getNumber) |
||||||
|
.orElse(null)) |
||||||
|
.addArgument(retainAboveThisBlockOrFinalized) |
||||||
|
.log(); |
||||||
|
|
||||||
|
final var pruneWindowEntries = |
||||||
|
trieLogBlocksAndForksByDescendingBlockNumber.asMap().entrySet().stream() |
||||||
|
.dropWhile((e) -> e.getKey() > retainAboveThisBlockOrFinalized) |
||||||
|
.limit(pruningLimit); |
||||||
|
|
||||||
|
final Multimap<Long, Hash> wasPruned = ArrayListMultimap.create(); |
||||||
|
|
||||||
|
pruneWindowEntries.forEach( |
||||||
|
(e) -> { |
||||||
|
for (Hash blockHash : e.getValue()) { |
||||||
|
if (rootWorldStateStorage.pruneTrieLog(blockHash)) { |
||||||
|
wasPruned.put(e.getKey(), blockHash); |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
wasPruned.keySet().forEach(trieLogBlocksAndForksByDescendingBlockNumber::removeAll); |
||||||
|
|
||||||
|
LOG.atTrace() |
||||||
|
.setMessage("pruned {} trie logs for blocks {}") |
||||||
|
.addArgument(wasPruned::size) |
||||||
|
.addArgument(wasPruned) |
||||||
|
.log(); |
||||||
|
LOG.atDebug() |
||||||
|
.setMessage("pruned {} trie logs from {} blocks") |
||||||
|
.addArgument(wasPruned::size) |
||||||
|
.addArgument(() -> wasPruned.keySet().size()) |
||||||
|
.log(); |
||||||
|
|
||||||
|
return wasPruned.size(); |
||||||
|
} |
||||||
|
|
||||||
|
public static TrieLogPruner noOpTrieLogPruner() { |
||||||
|
return new NoOpTrieLogPruner(null, null, 0, 0); |
||||||
|
} |
||||||
|
|
||||||
|
public static class NoOpTrieLogPruner extends TrieLogPruner { |
||||||
|
private NoOpTrieLogPruner( |
||||||
|
final BonsaiWorldStateKeyValueStorage rootWorldStateStorage, |
||||||
|
final Blockchain blockchain, |
||||||
|
final long numBlocksToRetain, |
||||||
|
final int pruningLimit) { |
||||||
|
super(rootWorldStateStorage, blockchain, numBlocksToRetain, pruningLimit, true); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initialize() { |
||||||
|
// no-op
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
void addToPruneQueue(final long blockNumber, final Hash blockHash) { |
||||||
|
// no-op
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
int pruneFromQueue() { |
||||||
|
// no-op
|
||||||
|
return -1; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue