Skip to content

Commit

Permalink
Merge branch 'master' into md/fix-p2p-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 authored Dec 19, 2024
2 parents 5809b1f + 852afb2 commit b66dcf0
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/vm_full_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
GITHUB_RUN_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
GIT_COMMIT: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,4 +35,4 @@ jobs:
with:
run: |
sudo shutdown -P 75 # hack until core part of the scripts
earthly-ci --no-output ./barretenberg/cpp/+vm-full-test --hardware_concurrency=64 # limit our parallelism to half our cores
scripts/earthly-ci --no-output ./barretenberg/cpp/+vm-full-test --hardware_concurrency=64 # limit our parallelism to half our cores
2 changes: 0 additions & 2 deletions spartan/aztec-network/templates/boot-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ spec:
value: "{{ .Values.bootNode.logLevel }}"
- name: LOG_JSON
value: "1"
- name: DEBUG
value: "{{ .Values.bootNode.debug }}"
- name: P2P_ENABLED
value: "{{ .Values.bootNode.p2p.enabled }}"
- name: COINBASE
Expand Down
2 changes: 0 additions & 2 deletions spartan/aztec-network/templates/prover-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ spec:
value: "{{ .Values.proverNode.logLevel }}"
- name: LOG_JSON
value: "1"
- name: DEBUG
value: "{{ .Values.proverNode.debug }}"
- name: PROVER_REAL_PROOFS
value: "{{ .Values.aztec.realProofs }}"
- name: PROVER_AGENT_COUNT
Expand Down
2 changes: 0 additions & 2 deletions spartan/aztec-network/templates/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
value: "{{ .Values.validator.logLevel }}"
- name: LOG_JSON
value: "1"
- name: DEBUG
value: "{{ .Values.validator.debug }}"
- name: P2P_ENABLED
value: "{{ .Values.validator.p2p.enabled }}"
- name: VALIDATOR_DISABLED
Expand Down
22 changes: 11 additions & 11 deletions spartan/aztec-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ bootNode:
p2pTcpPort: 40400
p2pUdpPort: 40400
nodePort: 8080
logLevel: "debug"
debug: ""
logLevel: "debug; info: aztec:simulator, json-rpc"
coinbaseAddress: "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
sequencer:
maxSecondsBetweenBlocks: 0
Expand Down Expand Up @@ -90,8 +89,7 @@ validator:
p2pTcpPort: 40400
p2pUdpPort: 40400
nodePort: 8080
logLevel: "debug"
debug: ""
logLevel: "debug; info: aztec:simulator, json-rpc"
sequencer:
maxSecondsBetweenBlocks: 0
minTxsPerBlock: 1
Expand Down Expand Up @@ -123,8 +121,7 @@ proverNode:
p2pTcpPort: 40400
p2pUdpPort: 40400
nodePort: 8080
logLevel: "debug"
debug: ""
logLevel: "debug; info: aztec:simulator, json-rpc"
proverAgent:
count: 0
pollIntervalMs: 1000
Expand All @@ -142,7 +139,7 @@ proverNode:
storage: "8Gi"

pxe:
logLevel: "debug"
logLevel: "debug; info: aztec:simulator, json-rpc"
replicas: 1
service:
nodePort: 8081
Expand All @@ -160,7 +157,7 @@ pxe:
bot:
enabled: true
nodeUrl: ""
logLevel: "debug"
logLevel: "debug; info: aztec:simulator, json-rpc"
replicas: 1
botPrivateKey: "0xcafe"
txIntervalSeconds: 24
Expand Down Expand Up @@ -221,7 +218,7 @@ proverAgent:
proofTypes: ["foo", "bar", "baz"]
gke:
spotEnabled: false
logLevel: "debug"
logLevel: "debug; info: aztec:simulator, json-rpc"
bb:
hardwareConcurrency: ""
nodeSelector: {}
Expand All @@ -236,9 +233,12 @@ proverBroker:
pollIntervalMs: 1000
jobMaxRetries: 3
dataDirectory: ""
logLevel: "debug"
logLevel: "debug; info: aztec:simulator, json-rpc"
nodeSelector: {}
resources: {}
resources:
requests:
memory: "2Gi"
cpu: "200m"

jobs:
deployL1Verifier:
Expand Down
29 changes: 26 additions & 3 deletions spartan/aztec-network/values/exp-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ validator:
- 0x3c3E2E178C69D4baD964568415a0f0c84fd6320A
resources:
requests:
memory: "512Mi"
memory: "8Gi"
cpu: "3.5"
validator:
disabled: false
sequencer:
Expand All @@ -129,16 +130,38 @@ bootNode:
storageSize: "100Gi"
validator:
disabled: true
resources:
requests:
memory: "8Gi"
cpu: "3.5"

proverAgent:
replicas: 4
replicas: 8

proverBroker:
resources:
requests:
memory: "8Gi"
cpu: "3.5"

proverNode:
resources:
requests:
memory: "8Gi"
cpu: "3.5"

bot:
replicas: 6
replicas: 10
followChain: "NONE"
enabled: true
txIntervalSeconds: 1

jobs:
deployL1Verifier:
enable: false

ethereum:
resources:
requests:
memory: "8Gi"
cpu: "3.5"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { type L2BlockId, type L2BlockSource, type L2Tips } from '../l2_block_sou
/** Creates a stream of events for new blocks, chain tips updates, and reorgs, out of polling an archiver or a node. */
export class L2BlockStream {
private readonly runningPromise: RunningPromise;
private isSyncing = false;

constructor(
private l2BlockSource: Pick<L2BlockSource, 'getBlocks' | 'getBlockHeader' | 'getL2Tips'>,
Expand Down Expand Up @@ -37,8 +38,10 @@ export class L2BlockStream {
return this.runningPromise.isRunning();
}

public sync() {
return this.runningPromise.trigger();
public async sync() {
this.isSyncing = true;
await this.runningPromise.trigger();
this.isSyncing = false;
}

protected async work() {
Expand Down Expand Up @@ -132,7 +135,7 @@ export class L2BlockStream {
`Emitting ${event.type} (${event.type === 'blocks-added' ? event.blocks.length : event.blockNumber})`,
);
await this.handler.handleBlockStreamEvent(event);
if (!this.isRunning()) {
if (!this.isRunning() && !this.isSyncing) {
throw new AbortError();
}
}
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli/src/cmds/devnet/faucet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function dripFaucet(
json: boolean,
log: LogFn,
): Promise<void> {
const url = new URL(`${faucetUrl}/drip/${account.toString()}`);
const url = new URL(`/drip/${account.toString()}`, faucetUrl);
url.searchParams.set('asset', asset);
const res = await fetch(url);
if (res.status === 200) {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/p2p/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const p2pConfigMappings: ConfigMappingsType<P2PConfig> = {
peerCheckIntervalMS: {
env: 'P2P_PEER_CHECK_INTERVAL_MS',
description: 'The frequency in which to check for new peers.',
...numberConfigHelper(30_000),
...numberConfigHelper(1_000),
},
l2QueueSize: {
env: 'P2P_L2_QUEUE_SIZE',
Expand Down

0 comments on commit b66dcf0

Please sign in to comment.