Skip to content

Commit 1ecdfec

Browse files
authored
Merge branch 'master' into antithesis-simplify-genconfig
2 parents bf44343 + 444a3e9 commit 1ecdfec

40 files changed

+1107
-800
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: 'Run the provided command in an environment configured to monitor tmpnet networks'
2+
description: 'Run the provided command in an environment configured to monitor tmpnet networks'
3+
4+
inputs:
5+
run:
6+
description: "the bash command to run"
7+
required: true
8+
filter_by_owner:
9+
default: ''
10+
prometheus_id:
11+
required: true
12+
prometheus_password:
13+
required: true
14+
loki_id:
15+
required: true
16+
loki_password:
17+
required: true
18+
# The following inputs need never be provided by the caller. They
19+
# default to context values that the action's steps are unable to
20+
# acccess directly.
21+
repository_owner:
22+
default: ${{ github.repository_owner }}
23+
repository_name:
24+
default: ${{ github.event.repository.name }}
25+
workflow:
26+
default: ${{ github.workflow }}
27+
run_id:
28+
default: ${{ github.run_id }}
29+
run_number:
30+
default: ${{ github.run_number }}
31+
run_attempt:
32+
default: ${{ github.run_attempt }}
33+
job:
34+
default: ${{ github.job }}
35+
36+
runs:
37+
using: composite
38+
steps:
39+
- name: Start prometheus
40+
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
41+
if: (inputs.prometheus_id != '')
42+
shell: bash
43+
run: bash -x ./scripts/run_prometheus.sh
44+
env:
45+
PROMETHEUS_ID: ${{ inputs.prometheus_id }}
46+
PROMETHEUS_PASSWORD: ${{ inputs.prometheus_password }}
47+
- name: Start promtail
48+
if: (inputs.prometheus_id != '')
49+
shell: bash
50+
run: bash -x ./scripts/run_promtail.sh
51+
env:
52+
LOKI_ID: ${{ inputs.loki_id }}
53+
LOKI_PASSWORD: ${{ inputs.loki_password }}
54+
- name: Notify of metrics availability
55+
if: (inputs.prometheus_id != '')
56+
shell: bash
57+
run: .github/actions/run-monitored-tmpnet-cmd/notify-metrics-availability.sh
58+
env:
59+
GRAFANA_URL: https://grafana-experimental.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }}
60+
GH_JOB_ID: ${{ inputs.job }}
61+
FILTER_BY_OWNER: ${{ inputs.filter_by_owner }}
62+
- name: Run command
63+
shell: bash
64+
run: ${{ inputs.run }}
65+
env:
66+
GH_REPO: ${{ inputs.repository_owner }}/${{ inputs.repository_name }}
67+
GH_WORKFLOW: ${{ inputs.workflow }}
68+
GH_RUN_ID: ${{ inputs.run_id }}
69+
GH_RUN_NUMBER: ${{ inputs.run_number }}
70+
GH_RUN_ATTEMPT: ${{ inputs.run_attempt }}
71+
GH_JOB_ID: ${{ inputs.job }}
File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Upload an artifact of tmpnet data'
2+
description: 'Upload an artifact of data in the ~/.tmpnet path'
3+
4+
inputs:
5+
name:
6+
description: "the name of the artifact to upload"
7+
required: true
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Upload tmpnet data
13+
uses: actions/upload-artifact@v4
14+
with:
15+
name: ${{ inputs.name }}
16+
path: |
17+
~/.tmpnet/networks
18+
~/.tmpnet/prometheus/prometheus.log
19+
~/.tmpnet/promtail/promtail.log
20+
if-no-files-found: error

.github/workflows/ci.yml

Lines changed: 25 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
2020
cancel-in-progress: true
2121

22-
env:
23-
grafana_url: https://grafana-experimental.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7Cava-labs%2Favalanchego&var-filter=gh_run_id%7C%3D%7C${{ github.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ github.run_attempt }}
24-
2522
jobs:
2623
Unit:
2724
runs-on: ${{ matrix.os }}
@@ -59,49 +56,19 @@ jobs:
5956
- name: Build AvalancheGo Binary
6057
shell: bash
6158
run: ./scripts/build.sh -r
62-
- name: Start prometheus
63-
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
64-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
65-
shell: bash
66-
run: bash -x ./scripts/run_prometheus.sh
67-
env:
68-
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
69-
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
70-
- name: Start promtail
71-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
72-
shell: bash
73-
run: bash -x ./scripts/run_promtail.sh
74-
env:
75-
LOKI_ID: ${{ secrets.LOKI_ID }}
76-
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
77-
- name: Notify of metrics availability
78-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
79-
shell: bash
80-
run: .github/workflows/notify-metrics-availability.sh
81-
env:
82-
GRAFANA_URL: ${{ env.grafana_url }}
83-
GH_JOB_ID: ${{ github.job }}
84-
FILTER_BY_OWNER: avalanchego-e2e
8559
- name: Run e2e tests
86-
shell: bash
87-
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh --delay-network-shutdown
88-
env:
89-
GH_REPO: ${{ github.repository }}
90-
GH_WORKFLOW: ${{ github.workflow }}
91-
GH_RUN_ID: ${{ github.run_id }}
92-
GH_RUN_NUMBER: ${{ github.run_number }}
93-
GH_RUN_ATTEMPT: ${{ github.run_attempt }}
94-
GH_JOB_ID: ${{ github.job }}
60+
uses: ./.github/actions/run-monitored-tmpnet-cmd
61+
with:
62+
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh --delay-network-shutdown
63+
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
64+
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
65+
loki_id: ${{ secrets.LOKI_ID || '' }}
66+
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
9567
- name: Upload tmpnet network dir
96-
uses: actions/upload-artifact@v4
68+
uses: ./.github/actions/upload-tmpnet-artifact
9769
if: always()
9870
with:
9971
name: e2e-tmpnet-data
100-
path: |
101-
~/.tmpnet/networks
102-
~/.tmpnet/prometheus/prometheus.log
103-
~/.tmpnet/promtail/promtail.log
104-
if-no-files-found: error
10572
e2e_existing_network:
10673
runs-on: ubuntu-latest
10774
steps:
@@ -110,48 +77,19 @@ jobs:
11077
- name: Build AvalancheGo Binary
11178
shell: bash
11279
run: ./scripts/build.sh -r
113-
- name: Start prometheus
114-
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
115-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
116-
shell: bash
117-
run: bash -x ./scripts/run_prometheus.sh
118-
env:
119-
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
120-
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
121-
- name: Start promtail
122-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
123-
shell: bash
124-
run: bash -x ./scripts/run_promtail.sh
125-
env:
126-
LOKI_ID: ${{ secrets.LOKI_ID }}
127-
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
128-
- name: Notify of metrics availability
129-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
130-
shell: bash
131-
run: .github/workflows/notify-metrics-availability.sh
132-
env:
133-
GRAFANA_URL: ${{ env.grafana_url }}
134-
GH_JOB_ID: ${{ github.job }}
13580
- name: Run e2e tests with existing network
136-
shell: bash
137-
run: E2E_SERIAL=1 ./scripts/tests.e2e.existing.sh --delay-network-shutdown
138-
env:
139-
GH_REPO: ${{ github.repository }}
140-
GH_WORKFLOW: ${{ github.workflow }}
141-
GH_RUN_ID: ${{ github.run_id }}
142-
GH_RUN_NUMBER: ${{ github.run_number }}
143-
GH_RUN_ATTEMPT: ${{ github.run_attempt }}
144-
GH_JOB_ID: ${{ github.job }}
81+
uses: ./.github/actions/run-monitored-tmpnet-cmd
82+
with:
83+
run: E2E_SERIAL=1 ./scripts/tests.e2e.existing.sh --delay-network-shutdown
84+
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
85+
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
86+
loki_id: ${{ secrets.LOKI_ID || '' }}
87+
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
14588
- name: Upload tmpnet network dir
146-
uses: actions/upload-artifact@v4
89+
uses: ./.github/actions/upload-tmpnet-artifact
14790
if: always()
14891
with:
14992
name: e2e-existing-network-tmpnet-data
150-
path: |
151-
~/.tmpnet/networks
152-
~/.tmpnet/prometheus/prometheus.log
153-
~/.tmpnet/promtail/promtail.log
154-
if-no-files-found: error
15593
Upgrade:
15694
runs-on: ubuntu-latest
15795
steps:
@@ -160,48 +98,20 @@ jobs:
16098
- name: Build AvalancheGo Binary
16199
shell: bash
162100
run: ./scripts/build.sh
163-
- name: Start prometheus
164-
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
165-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
166-
shell: bash
167-
run: bash -x ./scripts/run_prometheus.sh
168-
env:
169-
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
170-
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
171-
- name: Start promtail
172-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
173-
shell: bash
174-
run: bash -x ./scripts/run_promtail.sh
175-
env:
176-
LOKI_ID: ${{ secrets.LOKI_ID }}
177-
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
178-
- name: Notify of metrics availability
179-
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
180-
shell: bash
181-
run: .github/workflows/notify-metrics-availability.sh
182-
env:
183-
GRAFANA_URL: ${{ env.grafana_url }}
184-
GH_JOB_ID: ${{ github.job }}
185101
- name: Run e2e tests
186-
shell: bash
187-
run: ./scripts/tests.upgrade.sh
188-
env:
189-
GH_REPO: ${{ github.repository }}
190-
GH_WORKFLOW: ${{ github.workflow }}
191-
GH_RUN_ID: ${{ github.run_id }}
192-
GH_RUN_NUMBER: ${{ github.run_number }}
193-
GH_RUN_ATTEMPT: ${{ github.run_attempt }}
194-
GH_JOB_ID: ${{ github.job }}
102+
uses: ./.github/actions/run-monitored-tmpnet-cmd
103+
with:
104+
run: ./scripts/tests.upgrade.sh
105+
filter_by_owner: avalanchego-e2e
106+
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
107+
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
108+
loki_id: ${{ secrets.LOKI_ID || '' }}
109+
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
195110
- name: Upload tmpnet network dir
196-
uses: actions/upload-artifact@v4
111+
uses: ./.github/actions/upload-tmpnet-artifact
197112
if: always()
198113
with:
199114
name: upgrade-tmpnet-data
200-
path: |
201-
~/.tmpnet/networks
202-
~/.tmpnet/prometheus/prometheus.log
203-
~/.tmpnet/promtail/promtail.log
204-
if-no-files-found: error
205115
Lint:
206116
runs-on: ubuntu-latest
207117
steps:

snow/engine/snowman/issuer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ func (i *issuer) Execute(ctx context.Context, _ []ids.ID, abandoned []ids.ID) er
3434
// well.
3535
blkID := i.blk.ID()
3636
delete(i.t.pending, blkID)
37-
i.t.addToNonVerifieds(i.blk)
37+
i.t.markAsUnverified(i.blk)
3838
return i.t.blocked.Abandon(ctx, blkID)
3939
}

0 commit comments

Comments
 (0)