Skip to content

Commit

Permalink
fix: allow larger transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jan 18, 2025
1 parent ea372de commit 9cb016f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
10 changes: 3 additions & 7 deletions scripts/run_native_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,11 @@ if $METRICS; then
fi

# If an ethereum rpc url is provided, use it
if $ETHEREUM_HOST; then
export ETHEREUM_HOST
fi
if $L1_CONSENSUS_HOST_URL; then
export L1_CONSENSUS_HOST_URL
fi
export ETHEREUM_HOST
export L1_CONSENSUS_HOST_URL

# If an ethereum url has been provided, do not run the ethereum.sh script
if $ETHEREUM_HOST && $L1_CONSENSUS_HOST_URL; then
if [ -n "$ETHEREUM_HOST" ]; then
ETHEREUM_SCRIPT=""
else
ETHEREUM_SCRIPT="./ethereum.sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fi

# Write addresses to file for sourcing
echo "export ETHEREUM_HOST=${ETHEREUM_ADDR}" >> /shared/config/service-addresses
echo "export ETHEREUM_CONSENSUS_HOST=${ETHEREUM_CONSENSUS_ADDR}" >> /shared/config/service-addresses
echo "export L1_CONSENSUS_HOST_URL=${ETHEREUM_CONSENSUS_ADDR}" >> /shared/config/service-addresses
echo "export BOOT_NODE_HOST=${BOOT_NODE_ADDR}" >> /shared/config/service-addresses
echo "export PROVER_NODE_HOST=${PROVER_NODE_ADDR}" >> /shared/config/service-addresses
echo "export PROVER_BROKER_HOST=${PROVER_BROKER_ADDR}" >> /shared/config/service-addresses
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Service Address Setup Container
value: "{{ .Values.ethereum.execution.service.port }}"
- name: EXTERNAL_ETHEREUM_CONSENSUS_HOST
value: "{{ .Values.ethereum.beacon.externalHost }}"
- name: EXTERNAL_ETHEREUM_CONSENSUS_PORT
- name: ETHEREUM_CONSENSUS_PORT
value: "{{ .Values.ethereum.beacon.service.port }}"
- name: EXTERNAL_BOOT_NODE_HOST
value: "{{ .Values.bootNode.externalHost }}"
Expand Down
1 change: 1 addition & 0 deletions spartan/aztec-network/templates/eth-execution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
--http.addr="0.0.0.0"
--http.api="admin,net,eth,web3,debug,trace"
--http.corsdomain="*"
--txpool.max-tx-input-bytes={{ .Values.ethereum.maxTxInputSizeBytes }}
--max-outbound-peers=0
--max-inbound-peers=0
--ipcdisable
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ ethereum:
# 1 billion gas limit
# helps ensure we can deploy public contracts
gasLimit: "1000000000"
# 10 times the default of 131072
maxTxInputSizeBytes: "1310720"
args: ""
execution:
externalHost: ""
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/blob-sink/src/client/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { type BlobSinkClientInterface } from './interface.js';
import { LocalBlobSinkClient } from './local.js';

export function createBlobSinkClient(config?: BlobSinkConfig): BlobSinkClientInterface {
if (!config?.blobSinkUrl) {
if (!config?.blobSinkUrl && !config?.l1ConsensusHostUrl) {
const blobStore = new MemoryBlobStore();
return new LocalBlobSinkClient(blobStore);
}
Expand Down
5 changes: 4 additions & 1 deletion yarn-project/blob-sink/src/client/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,19 @@ export class HttpBlobSinkClient implements BlobSinkClientInterface {
this.log.debug('Getting blob sidecar from blob sink');
const blobs = await this.getBlobSidecarFrom(this.config.blobSinkUrl, blockHash, indices);
if (blobs.length > 0) {
this.log.debug(`Got ${blobs.length} blobs from blob sink`);
return blobs;
}
}

if (this.config.l1ConsensusHostUrl) {
// The beacon api can query by slot number, so we get that first
this.log.debug('Getting slot number from consensus host');
const slotNumber = await this.getSlotNumber(blockHash);
if (slotNumber) {
const blobs = await this.getBlobSidecarFrom(this.config.l1ConsensusHostUrl, slotNumber, indices);
if (blobs.length > 0) {
this.log.debug(`Got ${blobs.length} blobs from consensus host`);
return blobs;
}
}
Expand All @@ -94,6 +97,7 @@ export class HttpBlobSinkClient implements BlobSinkClientInterface {
blockHashOrSlot: string | number,
indices?: number[],
): Promise<Blob[]> {
// TODO(md): right now we assume all blobs are ours, this will not yet work on sepolia
try {
let url = `${hostUrl}/eth/v1/beacon/blob_sidecars/${blockHashOrSlot}`;
if (indices && indices.length > 0) {
Expand All @@ -104,7 +108,6 @@ export class HttpBlobSinkClient implements BlobSinkClientInterface {

if (res.ok) {
const body = await res.json();
this.log.debug(`Blob sidecar for block ${blockHashOrSlot} is ${body}`);
const blobs = body.data.map((b: BlobJson) => Blob.fromJson(b));
return blobs;
}
Expand Down

0 comments on commit 9cb016f

Please sign in to comment.