Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ad67b95
Chore: Move allocbounds (#6324)
jannotti May 16, 2025
e01b9e7
network: count received traffic before decompression (#6330)
algorandskiy May 20, 2025
64ae8b0
network: enable vote compression for P2PNetwork (#6331)
cce May 20, 2025
84b6567
API: Update 'value' in API Box type to be optional (reflecting update…
gmalouf May 21, 2025
b278dfd
tests: fix a race in TestP2PMetainfoExchange (#6336)
algorandskiy May 21, 2025
cd7f81c
Tests: be _under_ 1A, not equal (#6335)
jannotti May 21, 2025
34deef2
network: add "uncompressed bytes by tag" metric (#6334)
cce May 21, 2025
7ce14c2
CI: fix some more linter advice for old code (#6317)
cce May 23, 2025
a4b2adf
Build: Use latest oapi-codegen instead of fork. (#6306)
jannotti May 23, 2025
6f65ab1
refactor: use the built-in max/min to simplify the code (#6338)
knowmost May 23, 2025
94945b3
Merge branch 'rel/stable' into onetechnical/relstable4.1.1-remerge
onetechnical May 27, 2025
938a515
Remove buildnumber.dat and genesistimestamp.dat files.
onetechnical May 27, 2025
dbaca4d
tests: fix TestStateProofRecovery (#6342)
algorandskiy May 27, 2025
cec401c
Tests: Patch TestReadyStatusEndpoint. (#6341)
gmalouf May 27, 2025
5ea77f2
Merge pull request #6340 from onetechnical/onetechnical/relstable4.1.…
algojohnlee May 28, 2025
e25465b
API: Revert boxes pagination (#6343)
gmalouf May 29, 2025
2dbbf58
agreement: fix mainLoop vs Shutdown race (#6349)
algorandskiy May 29, 2025
e4aa2a8
CICD: GitHub Actions workflows for nightly and PR tests (#6346)
onetechnical May 30, 2025
3fd5a70
build: upgrade Go and package versions (#6307)
cce May 30, 2025
8b558ff
CI: fix test verification warnings (#6348)
cce May 30, 2025
a9d7bcc
libgoal: bump defaultKMDTimeoutSecs (#6353)
algorandskiy Jun 2, 2025
01c6157
Merge branch 'rel/stable' into relstable4.1.2-remerge
onetechnical Jun 2, 2025
15a7913
Merge pull request #6356 from algorand/relstable4.1.2-remerge
algojohnlee Jun 2, 2025
ab67434
crypto: add SHA-512 hashes (#6339)
cce Jun 3, 2025
2a21fca
test: waitFor was badly broken (#6359)
jannotti Jun 9, 2025
6147ebf
refactor: use slices.Contains to simplify code (#6357)
clonemycode Jun 10, 2025
ac31f0b
tests: fix testCatchpointAfterStakeLookupTxns (#6363)
algorandskiy Jun 11, 2025
da8878f
Syntax: Use "type X" syntax instead of "type ( .... )" (#6364)
jannotti Jun 11, 2025
9fcbeac
build(deps): bump github.com/pion/interceptor from 0.1.37 to 0.1.39 (…
dependabot[bot] Jun 11, 2025
ab03c94
CICD: switch nightly uploads to GitHub Actions (#6360)
onetechnical Jun 11, 2025
4078eca
build(deps): bump github.com/getkin/kin-openapi from 0.107.0 to 0.131…
dependabot[bot] Jun 11, 2025
61e13bd
Testing: test vFuture, so we are exercising branch512 (#6365)
jannotti Jun 12, 2025
619fd46
CICD: fix upload and slack failure For GitHub Actions and update badg…
onetechnical Jun 12, 2025
71750c2
CICD: fix uploading testdata in nightlies (#6367)
onetechnical Jun 12, 2025
f96262b
Config: reorg to allow use of basics (#6325)
jannotti Jun 13, 2025
981d065
CICD: add missing AWS credential configuration to e2e_subs (#6368)
onetechnical Jun 13, 2025
807b29a
CICD: fix upload and make e2e_subs_nightly required (#6369)
onetechnical Jun 14, 2025
310a900
CICD: fix short test flag and up parallelism (#6370)
onetechnical Jun 20, 2025
ab77540
Chore: Remove code that was need only during consensus update (#6371)
jannotti Jun 24, 2025
ecc67c3
CI: add test result uploads and refactor nightly config (#6372)
onetechnical Jun 26, 2025
9adaf55
p2p: ignore initial no peers error in capabilities advertisement (#6310)
algorandskiy Jun 26, 2025
da10cb5
API: Avoid downstream generated type changes for pre-existing Transac…
gmalouf Jul 7, 2025
03b00a1
node: fallback to ws or p2p on hybrid misconfiguration (#6376)
algorandskiy Jul 9, 2025
94de30f
tests: remove "Fail" part from test test names (#6377)
algorandskiy Jul 10, 2025
0a48a1d
Ops: Bump ubuntu and centos versions for building and testing (#6378)
gmalouf Jul 15, 2025
343d3dd
test: fix flaky TestLedgerBlockHeaders UpgradeState check (#6382)
cce Jul 15, 2025
c0c0235
network: do not use telemetry id for p2p nets (#6381)
algorandskiy Jul 16, 2025
61e4a7e
Dev: fix darwin universal targets (#6383)
onetechnical Jul 17, 2025
36be59f
Dev: add auto-generated CLAUDE.md file (#6379)
onetechnical Jul 17, 2025
de015d3
refactor: use maps.Copy for cleaner map handling (#6373)
sellskin Jul 18, 2025
36a83dd
network: refactor networking mesh maintaining code (#6374)
algorandskiy Jul 18, 2025
b375ec5
logging: log configuration migration messages (#6384)
cce Jul 23, 2025
fc6f7ac
network: disable pubsub PX for hybrid relays (#6385)
algorandskiy Jul 23, 2025
8f33ac2
Node Exporter: update binaries with new golang build and add arm64 su…
onetechnical Jul 23, 2025
6773c1c
Update the Version, BuildNumber, genesistimestamp.data
Algo-devops-service Jul 23, 2025
0c59a4f
Merge pull request #6389 from Algo-devops-service/relbeta4.2.0
algojohnlee Jul 24, 2025
03d24da
CI: run PR tests on release PRs (#6390)
onetechnical Jul 24, 2025
d9e8f58
config: update diagcfg to properly set globalDir (#6394)
cce Jul 31, 2025
1bf880a
Merge branch 'master' into relbeta4.2.1
Algo-devops-service Jul 31, 2025
0c6dbbb
Update the Version, BuildNumber, genesistimestamp.data
Algo-devops-service Jul 31, 2025
32dc751
Merge pull request #6399 from Algo-devops-service/relbeta4.2.1
algojohnlee Aug 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
729 changes: 0 additions & 729 deletions .circleci/config.yml

This file was deleted.

494 changes: 494 additions & 0 deletions .github/workflows/ci-nightly.yml

Large diffs are not rendered by default.

425 changes: 425 additions & 0 deletions .github/workflows/ci-pr.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/codegen_verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
jobs:
codegen_verification:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
services:
converter:
image: swaggerapi/swagger-converter@sha256:dcfd1c2537f5f271cb4ec942d08aa59ca41b9a24078040061a772afca7e548ae # v1.0.4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build-and-push:
name: Build and Push to DockerHub
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ tools/x-repo-types/x-repo-types

# python virtual environment
.venv

# ignore local claude config changes
CLAUDE.local.md
174 changes: 174 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Common Development Commands

### Build
```bash
make build # Build all binaries
make install # Build and install binaries to $GOPATH/bin
make buildsrc # Build main source (faster than full build)
```

### Testing
```bash
make test # Run unit tests
make fulltest # Run unit tests with race detection
make shorttest # Run short tests with race detection
make integration # Run integration tests
make testall # Run all tests (unit + integration)
```

### Code Quality
```bash
make sanity # Run all checks (fmt, lint, fix, tidy)
make fmt # Format code and check licenses
make lint # Run linter (requires deps)
make fix # Run algofix tool
make vet # Run go vet
make tidy # Clean up go.mod files
```

### Code Generation

Some code must be re-generated after changes. Run the following to regenerate auto-generated code if changes are made to relevant files.

```
make rebuild_kmd_swagger # Rebuild swagger.json files
make generate # Regenerate for stringer et al.
make expectlint # Run expect linter
touch data/transactions/logic/fields_string.go # Ensure rebuild of teal specs
make -C data/transactions/logic # Update TEAL Specs
touch daemon/algod/api/algod.oas2.json # Ensure rebuild of API spec
make -C daemon/algod/api generate # Regenerate REST server
make msgp # Regenerate msgp files
```

To verify that this wasn't missed, we run verification steps, which can be found in `scripts/travis/codegen_verification.sh`. If code is not clean, it will fail CI checks.

### Development Setup
```bash
./scripts/configure_dev.sh # Initial environment setup
./scripts/buildtools/install_buildtools.sh # Install build tools
make deps # Check/install dependencies
```

### Single Test Execution
```bash
go test -v -run TestName ./path/to/package # Run specific test
go test -v ./agreement/... # Run tests in package tree rooted at agreement
go test -v ./agreement/ # Run tests for just the agreement package
```

### Running E2E tests
E2E tests run one or more algod processes, each with their own data directory containing logs and configuration (created in a subdirectory of TESTDIR). If an E2E test fails, useful information can often be found in the node.log files produced by algod while running the test. For example:
```bash
export NODEBINDIR=~/go/bin # path to algod, goal, etc. Code changes to goal or algod require rebuilding with "make" to place new binaries here before running E2E tests.
export TESTDATADIR=`pwd`/test/testdata # path to go-algorand/test/testdata
export TESTDIR=/tmp
# network and node data will be created in /tmp/TestAssetSend/, logs in /tmp/TestAssetSend/Primary/node.log and /tmp/TestAssetSend/Node/node.log
go test ./test/e2e-go/features/transactions -run TestAssetSend -v -timeout=0
```

## Architecture Overview

### Main Binaries
- **`algod`**: Core blockchain node daemon (consensus, networking, REST API)
- **`kmd`**: Key Management Daemon (secure wallet operations, isolated process)
- **`goal`**: Primary CLI tool for node interaction and account management
- **`algokey`**: Standalone key generation and management utility

### Core Components

#### Node Layer (`node/`)
Central orchestrator that integrates all subsystems. The `AlgorandFullNode` struct manages:
- Ledger state and transaction pool
- Network communication and message routing
- Agreement service for consensus participation
- Catchup service for blockchain synchronization

#### Agreement Layer (`agreement/`)
Implements Algorand's Byzantine Agreement protocol:
- **Service**: Main consensus coordinator
- **State Machine**: Manages consensus rounds, periods, and steps
- **Vote/Proposal Managers**: Handle consensus message flow
- **CryptoVerifier**: Asynchronous signature verification

#### Ledger Layer (`ledger/`)
Manages blockchain state using tracker-based architecture:
- **Blockchain Storage**: Sequential block storage with certificates
- **Trackers**: Independent state machines consuming blockchain events
- `accountUpdates`: Account balances and application state
- `acctsOnline`: Online account tracking for consensus
- `catchpointTracker`: Catchpoint generation for fast sync
- `txTail`: Recent transaction tracking
- **Atomic Updates**: Coordinated state transitions across trackers

#### Network Layer (`network/`)
Supports multiple networking implementations through `GossipNode` interface:
- **WebSocket Network**: Traditional relay-based topology
- **P2P Network**: LibP2P-based peer-to-peer networking
- **Hybrid Network**: Combines both approaches

#### Data Layer (`data/`)
- **Transaction Pool**: Manages pending transactions
- **Transaction Handler**: Processes incoming network transactions
- **Account Manager**: Handles participation key lifecycle
- **Core Types**: Transactions, blocks, accounts, and protocol structures

#### Cryptography (`crypto/`)
- Ed25519 signatures, multisig, LogicSig (smart signatures)
- VRF (Verifiable Random Functions) for consensus leader selection
- State proof cryptography for light client verification
- Merkle tree implementations for data integrity

### Key Architectural Patterns

#### Interface-Based Design
System boundaries defined by Go interfaces:
- `GossipNode`: Network abstraction
- `BlockValidator`/`BlockFactory`: Consensus integration
- `Ledger`: Storage abstraction
- `KeyManager`: Cryptographic operations

#### Tracker Pattern
Ledger uses independent state machines that can rebuild from blockchain events, enabling:
- Stateless tracker logic with optional persistent caching
- Atomic coordinated updates across different state types
- Efficient state rebuilding and validation

#### Concurrent Architecture
- Agreement service separates concurrent I/O from serialized protocol logic
- Crypto verification runs in dedicated thread pools
- Network and disk operations use separate goroutines

#### Security Isolation
- KMD runs as separate process to isolate key material
- Transaction verification separated from consensus participation
- Clear boundaries between trusted and untrusted operations

## Development Guidelines

### Testing Strategy
- Unit tests focus on individual component logic
- Integration tests verify cross-component interactions
- Race detection enabled for concurrent code validation
- Benchmark tests for performance-critical paths

### Code Organization
- Interface-first design for testability and modularity
- Dependency injection for component assembly
- Clear separation between protocol logic and implementation details
- Consistent error handling patterns throughout

### Performance Considerations
- Tracker pattern enables efficient state caching
- Asynchronous block writing with in-memory queues
- Parallel transaction verification
- Catchpoint mechanism for fast node synchronization

### Protocol Evolution
- Consensus parameters support versioning for upgrades
- Backward compatibility maintained through careful interface design
- Feature flags and gradual rollout mechanisms
1 change: 1 addition & 0 deletions CLAUDE.md
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04 as builder
FROM ubuntu:24.04 AS builder

ARG GO_VERSION="1.23.3"
ARG GO_VERSION="1.23.9"

ARG CHANNEL
ARG URL
Expand Down Expand Up @@ -41,7 +41,7 @@ RUN /dist/files/build/install.sh \
-b "${BRANCH}" \
-s "${SHA}"

FROM debian:bookworm-20240311-slim as final
FROM debian:bookworm-20250630-slim AS final

ENV PATH="/node/bin:${PATH}" ALGOD_PORT="8080" KMD_PORT="7833" ALGORAND_DATA="/algod/data"

Expand Down
Loading
Loading