Skip to content

Commit 22d9587

Browse files
Add linkspector CI action (#3939)
Signed-off-by: Stephen Buttolph <[email protected]> Co-authored-by: meaghanfitzgerald <[email protected]>
1 parent fe25cc3 commit 22d9587

File tree

11 files changed

+34
-18
lines changed

11 files changed

+34
-18
lines changed

.github/workflows/ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ jobs:
130130
push: false
131131
# This version should match the version installed in the nix dev shell
132132
version: 1.47.2
133+
links-lint:
134+
name: Markdown Links Lint
135+
runs-on: ubuntu-latest
136+
steps:
137+
- uses: actions/checkout@v4
138+
- uses: umbrelladocs/action-linkspector@a0567ce1c7c13de4a2358587492ed43cab5d0102 #v1.3.4
139+
with:
140+
fail_level: any
133141
check_generated_protobuf:
134142
name: Up-to-date protobuf
135143
runs-on: ubuntu-latest

.linkspector.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dirs:
2+
- .
3+
excludedFiles:
4+
- RELEASES.md # This file has too many links to efficiently check
5+
ignorePatterns:
6+
- pattern: '^http://localhost.*$' # Localhost links are used during tutorials
7+
- pattern: "^https://.+\\.avax-dev\\.network$" # This check doesn't have the correct credentials
8+
useGitIgnore: true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ For more information, refer to the [GRPC Golang Quick Start Guide](https://grpc.
187187

188188
### Running mock codegen
189189

190-
See [the Contributing document autogenerated mocks section](CONTRIBUTING.md#Autogenerated-mocks).
190+
See [the Contributing document autogenerated mocks section](CONTRIBUTING.md####Autogenerated-mocks).
191191

192192
## Versioning
193193

api/metrics/service.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ curl -X POST 127.0.0.1:9650/ext/metrics
2020

2121
## Format
2222

23-
This API produces Prometheus compatible metrics. See [here](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md) for information on Prometheus' formatting.
23+
This API produces Prometheus compatible metrics. See [here](https://prometheus.io/docs/instrumenting/exposition_formats) for information on Prometheus' formatting.
2424

2525
[Here](https://build.avax.network/docs/nodes/maintain/monitoring) is a tutorial that shows how to set up Prometheus and Grafana to monitor AvalancheGo node using the Metrics API.

config/config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Path to a JSON file containing the genesis data to use. Ignored when running
384384
standard networks (Mainnet, Fuji Testnet), or when `--genesis-content` is
385385
specified. If not given, uses default genesis data.
386386

387-
See the documentation for the genesis JSON format [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/README.md) and an example used for the local network genesis [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/).
387+
See the documentation for the genesis JSON format [here](../genesis/README.md) and an example used for the local network genesis [here](../genesis/genesis_local.json).
388388

389389

390390
#### `--genesis-file-content` (string)

genesis/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Genesis
22

3-
The Genesis package converts formatted JSON files into the genesis of the Primary Network. For the simplest example, see the [Local Genesis](https://github.com/ava-labs/avalanchego/blob/master/genesis/genesis_local.json) JSON file.
3+
The Genesis package converts formatted JSON files into the genesis of the Primary Network. For the simplest example, see the [Local Genesis](./genesis_local.json) JSON file.
44

55
The genesis JSON file contains the following properties:
66

snow/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ All messaging functions in `OutboundMsgBuilder` can be categorized as follows:
4545

4646
Currently, Avalanchego implements its own message serialization to communicate. In the future, Avalanchego will use protocol buffers to communicate.
4747

48-
### [Network](https://github.com/ava-labs/avalanchego/blob/master/network/network.go)
48+
### [Network](../network/network.go)
4949

5050
The networking interface is shared across all chains. It implements functions from the `ExternalSender` interface. The two functions it implements are `Send` and `Gossip`. `Send` sends a message of type `OutboundMessage` to a specific set of nodes (specified by an array of `NodeIDs`). `Gossip` sends a message of type `OutboundMessage` to a random group of nodes in a subnet (can be a validator or a non-validator). Gossiping is used to push transactions across the network. The networking protocol uses TLS to pass messages between peers.
5151

5252
Along with sending and gossiping, the networking library is also responsible for making connections and maintaining connections. Any node whether they are a validator or non-validator will attempt to connect to the primary network.
5353

54-
## [Router](https://github.com/ava-labs/avalanchego/blob/master/snow/networking/router/chain_router.go)
54+
## [Router](./networking/router/chain_router.go)
5555

5656
The `ChainRouter` routes all incoming messages to its respective blockchain using `ChainID`. It does this by pushing all the messages onto the respective Chain handler’s queue. The `ChainRouter` references all existing chains on the network such as the X-chain, C-chain, P-chain and possibly any other chain. The `ChainRouter` handles timeouts as well. When sending messages on the P2P layer, timeouts are registered on the sender and cleared on the `ChainRouter` side when a response is received. If no response is received, then we trigger a timeout. Because we handle timeouts on the `ChainRouter` side, the handler is reliable. Peers not responding means timeouts trigger and the `ChainRouter` will still notify the handler of failure cases. The timeout manager within `ChainRouter` is also adaptive. If the network is experiencing long latencies, timeouts will then be adjusted as well.
5757

58-
## [Handler](https://github.com/ava-labs/avalanchego/blob/master/snow/networking/handler/handler.go)
58+
## [Handler](./networking/handler/handler.go)
5959

6060
The main function of the `Handler` is to pass messages from the network to the consensus engine. It receives these messages from the `ChainRouter`. It passes messages by pushing them onto a sync or async queue (depends on message type). Messages are then popped from the queue, parsed, and routed to the correct function in consensus engine. This can be one of the following.
6161

@@ -64,14 +64,14 @@ The main function of the `Handler` is to pass messages from the network to the c
6464
- **Consensus message (sync queue)**
6565
- **App message (async queue)**
6666

67-
## [Sender](https://github.com/ava-labs/avalanchego/blob/master/snow/networking/sender/sender.go)
67+
## [Sender](./networking/sender/sender.go)
6868

6969
The main role of the `sender` is to build and send outbound messages. It is actually a very thin wrapper around the normal networking code. The main difference here is that sender registers timeouts and tells the [router] to expect a response message. The timer starts on the sender side. If there is no response, sender will send a failed response to the [router]. If a node is repeatedly unresponsive, that node will get benched and sender will immediately start marking those messages as failed. If a sufficient amount of network deems the node benched, it might not get rewards (as a validator).
7070

71-
## [Consensus Engine](https://github.com/ava-labs/avalanchego/blob/master/snow/consensus/snowman/consensus.go)
71+
## [Consensus Engine](./consensus/snowman/consensus.go)
7272

7373
Consensus is defined as getting a group of distributed systems to agree on an outcome. In the case of the Avalanche network, consensus is achieved when validators are in agreement with the state of the blockchain. The novel consensus algorithm is documented in the [white paper](https://assets.website-files.com/5d80307810123f5ffbb34d6e/6009805681b416f34dcae012_Avalanche%20Consensus%20Whitepaper.pdf). There are two main consensus algorithms: Avalanche and Snowman. The engine is responsible for proposing a new block to consensus, repeatedly polling the network for decisions (accept/reject), and communicating that decision to the `Sender`.
7474

75-
## [Blockchain Creation](https://github.com/ava-labs/avalanchego/blob/master/chains/manager.go)
75+
## [Blockchain Creation](../chains/manager.go)
7676

7777
The `Manager` is what kickstarts everything in regards to blockchain creation, starting with the P-Chain. Once the P-Chain finishes bootstrapping, it will kickstart C-Chain and X-Chain and any other chain. The `Manager`’s job is not done yet, if a create chain transaction is seen by a validator, a whole new process to create a chain will be started by the `Manager`. This can happen dynamically, long after the original 3 chains are created and bootstrapped.

tests/antithesis/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Antithesis Testing
22

33
This package supports testing with
4-
[Antithesis](https://antithesis.com/docs/introduction/introduction.html),
4+
[Antithesis](https://antithesis.com/docs/introduction/how_antithesis_works),
55
a SaaS offering that enables deployment of distributed systems (such
66
as Avalanche) to a deterministic and simulated environment that
77
enables discovery and reproduction of anomalous behavior.

tests/e2e/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ flags.
2626
In cases where a change can be verified against only a subset of
2727
tests, it is possible to filter the tests that will be executed by the
2828
declarative labels that have been applied to them. Available labels
29-
are defined as constants in [`describe.go`](./describe.go) with names
29+
are defined as constants in [`describe.go`](../fixture/e2e/describe.go) with names
3030
of the form `*Label`. The following example runs only those tests that
3131
primarily target the X-Chain:
3232

@@ -40,7 +40,7 @@ queries](https://onsi.github.io/ginkgo/#spec-labels).
4040

4141
## Adding tests
4242

43-
Define any flags/configurations in [`e2e.go`](./e2e.go).
43+
Define any flags/configurations in [`flags.go`](../fixture/e2e/flags.go).
4444

4545
Create a new package to implement feature-specific tests, or add tests to an existing package. For example:
4646

@@ -135,4 +135,4 @@ until stopped by `tmpnetctl stop-collectors`.
135135
The results of collection will be viewable at
136136
https://grafana-poc.avax-dev.network.
137137

138-
For more detail, see the [tmpnet docs](../tmpnet/README.md#monitoring).
138+
For more detail, see the [tmpnet docs](../fixture/tmpnet/README.md##monitoring).

tests/fixture/e2e/describe.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const (
99
// For label usage in ginkgo invocation, see: https://onsi.github.io/ginkgo/#spec-labels
1010

1111
// Label for filtering a test that is not primarily a C-Chain test
12-
// but nonentheless uses the C-Chain. Intended to support
12+
// but nonetheless uses the C-Chain. Intended to support
1313
// execution of all C-Chain tests by the coreth repo in an e2e job.
1414
UsesCChainLabel = "uses-c"
1515
)

vms/example/xsvm/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Just as [Coreth] powers the [C-Chain], XSVM can be used to power its own blockch
2222

2323
## How it Works
2424

25-
XSVM utilizes AvalancheGo's [teleporter] package to create and authenticate Subnet Messages.
25+
XSVM utilizes AvalancheGo's [interchain messaging] package to create and authenticate Subnet Messages.
2626

2727
### Transfer
2828

@@ -121,7 +121,7 @@ type Client interface {
121121
ctx context.Context,
122122
txID ids.ID,
123123
options ...rpc.Option,
124-
) (*teleporter.UnsignedMessage, []byte, error)
124+
) (*warp.UnsignedMessage, []byte, error)
125125
}
126126
```
127127

@@ -283,7 +283,7 @@ P-Chain.
283283

284284
You can do this by following the [subnet tutorial] or by using the [subnet-cli].
285285

286-
[teleporter]: https://github.com/ava-labs/avalanchego/tree/master/vms/platformvm/teleporter
286+
[interchain messaging]: https://github.com/ava-labs/avalanchego/tree/master/vms/platformvm/warp/README.md
287287
[subnet tutorial]: https://build.avax.network/docs/tooling/create-avalanche-l1
288288
[Coreth]: https://github.com/ava-labs/coreth
289289
[C-Chain]: https://build.avax.network/docs/quick-start/primary-network#c-chain

0 commit comments

Comments
 (0)