Skip to content

Commit 5fc4548

Browse files
chore: sync to arc-node
- eba4c9745946a6f25a40c408fbffd0f974b69a2a chore: sync from main@391f3332dec78b32229101d1f597ee7c9bd... by circle-github-action-bot <[internal]> - fb4fcdba4c23a8f6a5bbdd78b4f93e4067dd49b0 chore: sync from main@b5f38a110dcba2f7baf70776a61d619d77f... by circle-github-action-bot <[internal]> - 0e03330c5aa6a0ba9d9298f71f6396d235ab1779 chore: sync from main@3df766646e40b64490597640decee807a33... by circle-github-action-bot <[internal]> - 22d039059f388125f0b80b5d753b90e6a32d2c6a chore: sync from main@e12060a75059eefcb3525a1ce581708bb00... by circle-github-action-bot <[internal]> - 4a9f8425088f54c7bd1c5ac48aac6b0734b9be10 chore: sync from main@1ead54346685b16f798e5b1917dce309f26... by circle-github-action-bot <[internal]> - ae25f503b423df58c6a6c6702dae82fbbf6d1185 chore: sync from main@cf4f9cc5e7d5bbbedb8e03a0f88c8b35589... by circle-github-action-bot <[internal]> - 8881b886e4e582570094dd97b31068014ddb0b90 ci: auto-label external arc-node PRs as pend... by circle-github-action-bot <[internal]> - be663db3644c23ab48e47e18fc907cacf630873d chore: sync from main@27e0db142093ed3a9ad366bda236af50e0d... by circle-github-action-bot <[internal]> - 87bbb904dbf5b02d15b21014151d3cf70e2d9d07 chore: sync from main@6e37777fd23dc50c3571ed9265f99ba5609... by circle-github-action-bot <[internal]> - c58b7f91171ac2344c3fd07e3ac52b31b1278da0 chore: sync from main@feacfe3623dbb3497b3a1c28d9a218460d4... by circle-github-action-bot <[internal]> - 9b4bb61370814d43a53b7f5374ee124108584907 chore: sync from main@8da4b7193194748d2c62c0876e40851dac5... by circle-github-action-bot <[internal]> - b27487fcf5ce097574a88dac76b740a41dc10777 chore: sync from main@0bc52ca1439339369846a0aa4bfbc24c300... by circle-github-action-bot <[internal]> - 50670ab0dd507c63487075642f2ade8d065ce8ff chore: sync from main@df698f343631a7ff354a57228fcad084465... by circle-github-action-bot <[internal]> GitOrigin-RevId: eba4c9745946a6f25a40c408fbffd0f974b69a2a
1 parent 9c7ddbd commit 5fc4548

74 files changed

Lines changed: 5223 additions & 1455 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,17 @@ docker-compose*
5757
.dockerignore
5858
docker-bake.hcl
5959

60-
# CI/CD
60+
# CI/CD and tooling
6161
.github/
62+
.claude/
6263
.gitlab-ci.yml
6364
.travis.yml
65+
atlantis.yaml
66+
67+
# JS tooling (not needed for Rust builds)
68+
package.json
69+
package-lock.json
70+
k6/
6471

6572
# Logs
6673
*.log
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SECURITY: This workflow uses pull_request_target. Do NOT add actions/checkout
2+
# with a PR-controlled ref: that would execute attacker code with write access
3+
# to secrets. Only read pull_request metadata.
4+
name: Label External PRs for Import
5+
6+
on:
7+
pull_request_target:
8+
types: [closed]
9+
branches: [main]
10+
11+
permissions:
12+
issues: write
13+
14+
concurrency:
15+
group: label-external-pr-${{ github.event.pull_request.number }}
16+
cancel-in-progress: false
17+
# cancel-in-progress: false is correct — label ops are idempotent but partial
18+
# cancellation could leave a PR unlabeled. Two simultaneous merges both hit
19+
# `gh label create --force`; one wins, the other is a no-op.
20+
21+
jobs:
22+
label:
23+
# Skip unmerged closes and the automated upstream-sync squash PRs.
24+
# Bot author AND sync branch are both checked as belt-and-suspenders;
25+
# either alone is sufficient to identify a sync PR.
26+
if: >-
27+
github.repository == 'circlefin/arc-node' &&
28+
github.event.pull_request.merged == true &&
29+
!(github.event.pull_request.user.login == 'circle-github-action-bot' &&
30+
github.event.pull_request.head.ref == 'sync/copybara-export')
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 5
33+
steps:
34+
- name: Ensure label exists and apply
35+
env:
36+
GH_TOKEN: ${{ github.token }}
37+
PR_NUMBER: ${{ github.event.pull_request.number }}
38+
REPO: ${{ github.repository }}
39+
run: |
40+
set -euo pipefail
41+
gh label create pending-import \
42+
--repo "${REPO}" \
43+
--color ededed \
44+
--description "Merged PR awaiting reverse-sync to upstream" \
45+
--force
46+
gh pr edit "${PR_NUMBER}" --repo "${REPO}" --add-label pending-import

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ node_modules/
6868
**/*.rs.bk
6969
*.pdb
7070

71+
# Python-specific
72+
__pycache__/
73+
*.pyc
74+
7175
# Test artifacts
7276
/test-results/
7377
/coverage/

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@ Arc is an open EVM-compatible layer 1 built on [Malachite](https://github.com/ci
3131
- 🗳️ **[Consensus](crates/malachite-app/README.md)** - Consensus binary and configuration
3232
- More: see Arc [developer docs](https://docs.arc.network/arc/concepts/welcome-to-arc) for guides, APIs, and specs
3333

34-
## Run a Node
34+
## Install and Run a Node
3535

36-
See [Installation — Build from Source](docs/installation.md#build-from-source) for how to build and install arc-node binaries, and [Running an Arc Node](docs/running-an-arc-node.md) for configuration and startup.
36+
### Install
37+
38+
See [Installation](docs/installation.md) for how to obtain the Arc node
39+
binaries or Docker images (pre-built, from source, or via Docker).
40+
41+
### Run
42+
43+
See [Running an Arc Node](docs/running-an-arc-node.md) for configuration and
44+
startup (binaries or Docker Compose).
3745

3846
## Development
3947

arcup/arcup

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ set -e
88
# WARNING: the SemVer pattern: major.minor.patch must be followed as we use it to determine if the script is up to date.
99
ARCUP_INSTALLER_VERSION="0.0.1"
1010

11-
REPO="circlefin/arc-node"
12-
# TODO: set GPG key fingerprint once release signing is configured
11+
REPO="${ARC_REPO:-circlefin/arc-node}"
12+
if [[ -n "${ARC_REPO:-}" ]] && [[ ! "$ARC_REPO" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]; then
13+
echo "error: invalid ARC_REPO format: '$ARC_REPO' (expected 'owner/repo')" >&2
14+
exit 1
15+
fi
16+
# TODO: set GPG key fingerprint once release signing key is published
1317
GPG_KEY_FINGERPRINT=""
1418
GPG_KEYSERVER="keyserver.ubuntu.com"
1519
BIN_DIR="${ARC_BIN_DIR:-$HOME/.arc/bin}"
20+
# Self-update always uses the canonical repo to prevent hijack via ARC_REPO
1621
ARCUP_BIN_URL="https://raw.githubusercontent.com/circlefin/arc-node/main/arcup/arcup"
1722
ARCUP_BIN_PATH="$BIN_DIR/arcup"
1823
CURL_HEADERS=()
@@ -333,6 +338,11 @@ main() {
333338
check_installer_up_to_date
334339

335340
info "Installing arc-node binaries..."
341+
info "Using repository: $REPO"
342+
343+
if [[ -z "$GPG_KEY_FINGERPRINT" ]]; then
344+
warn "GPG signature verification is disabled — no release signing key configured"
345+
fi
336346

337347
mkdir -p "$BIN_DIR"
338348

assets/localdev/genesis.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import fs from 'fs'
1818
import { z } from 'zod'
1919
import { parseEther, parseGwei, toHex, zeroAddress } from 'viem'
2020
import { privateKeyToAccount } from 'viem/accounts'
21-
import { createBuilderContext, buildGenesis, GenesisConfig, schemaGenesisConfig } from '../../scripts/genesis'
21+
import { createBuilderContext, buildGenesis, GenesisConfig, schemaGenesisConfig, localdevFeeRecipient } from '../../scripts/genesis'
2222
import { bigintReplacer } from '../../scripts/genesis/types'
2323
import { LocalDevAccountCreator } from '../../scripts/genesis/AccountCreator'
2424

@@ -73,7 +73,7 @@ const build = async (options: z.infer<typeof localBuilderOptionsSchema>) => {
7373

7474
const config: GenesisConfig = {
7575
timestamp: 1763620028n,
76-
coinbase: proxyAdmin.address,
76+
coinbase: localdevFeeRecipient,
7777
hardforks: {
7878
zero3Block: 0,
7979
...hardforks,

assets/localdev/genesis.json

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

contracts/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
This directory contains Solidity contracts and tests for the Arc project, built with Foundry.
44

5+
## Compiler choice for genesis-deployed contracts
6+
7+
**Forge is the canonical compiler** for every CREATE2-deployed contract in Arc genesis
8+
(`Memo`, `Multicall3From`, `Denylist` impl, `ProtocolConfig` impl, `ValidatorRegistry`
9+
impl, `PermissionedValidatorManager` impl, `GasGuzzler`, `TestToken`).
10+
11+
The genesis builder (`contracts/scripts/ArtifactHelper.s.sol`), all CREATE2-sensitive
12+
tests (`tests/localdev/genesis.test.ts`) all read from `contracts/out/forge/`.
13+
Hardhat's compile output is **not** consumed for any CREATE2-sensitive path.
514

615
## Foundry
716

contracts/scripts/Addresses.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ library Addresses {
3636
// ============ Predeployed Contracts ============
3737
address internal constant DETERMINISTIC_DEPLOYER_PROXY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;
3838
address internal constant MULTICALL3 = 0xcA11bde05977b3631167028862bE2a173976CA11;
39-
address internal constant MULTICALL3_FROM = 0xEb7cc06E3D3b5F9F9a5fA2B31B477ff72bB9c8b6;
40-
address internal constant MEMO = 0x9702466268ccF55eAB64cdf484d272Ac08d3b75b;
39+
address internal constant MULTICALL3_FROM = 0x825F535677d346626cDE45D64cf89C2a426467e0;
40+
address internal constant MEMO = 0xe4aa7Ed3585AEf598179f873086F75Fcd6D4b755;
4141

4242
// ============ Helpers ============
4343

contracts/scripts/ArtifactHelper.s.sol

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
pragma solidity ^0.8.29;
1818

19+
// ArtifactHelper — genesis builder entrypoint. Reads compiled contract bytecode and
20+
// simulates CREATE2 deployments to produce the `alloc` entries baked into genesis.json.
21+
//
22+
// Forge is canonical for all CREATE2-deployed genesis contracts — do NOT switch this
23+
// to read Hardhat's output.
1924
import {Script, console} from "forge-std/Script.sol";
2025
import {stdJson} from "forge-std/StdJson.sol";
2126

@@ -154,11 +159,12 @@ contract ArtifactHelper is Script {
154159
}
155160

156161
function deployArcNetworkContracts(string memory arcNetworkContractDir, address validatorRegistryProxyAddr) internal returns (string memory) {
162+
// Reads Forge's flat `<Name>.sol/<Name>.json` layout via `.bytecode.object`.
157163
// ProtocolConfig
158164
address protocolConfig = deployDeterministicContract(
159165
loadBytecode(
160-
string.concat(arcNetworkContractDir, "protocol-config/ProtocolConfig.sol/ProtocolConfig.json"),
161-
".bytecode"
166+
string.concat(arcNetworkContractDir, "ProtocolConfig.sol/ProtocolConfig.json"),
167+
".bytecode.object"
162168
)
163169
);
164170
vm.serializeString("output", "ProtocolConfig", getJsonContractCode(address(protocolConfig)));
@@ -167,16 +173,16 @@ contract ArtifactHelper is Script {
167173
address denylist = deployDeterministicContract(
168174
loadBytecode(
169175
string.concat(arcNetworkContractDir, "Denylist.sol/Denylist.json"),
170-
".bytecode"
176+
".bytecode.object"
171177
)
172178
);
173179
vm.serializeString("output", "Denylist", getJsonContractCode(address(denylist)));
174180

175181
// ValidatorRegistry
176182
address validatorRegistry = deployDeterministicContract(
177183
loadBytecode(
178-
string.concat(arcNetworkContractDir, "validator-manager/ValidatorRegistry.sol/ValidatorRegistry.json"),
179-
".bytecode"
184+
string.concat(arcNetworkContractDir, "ValidatorRegistry.sol/ValidatorRegistry.json"),
185+
".bytecode.object"
180186
)
181187
);
182188
vm.serializeString("output", "ValidatorRegistry", getJsonContractCode(address(validatorRegistry)));
@@ -185,8 +191,8 @@ contract ArtifactHelper is Script {
185191
address proxy = deployDeterministicContract(
186192
bytes.concat(
187193
loadBytecode(
188-
string.concat(arcNetworkContractDir, "proxy/AdminUpgradeableProxy.sol/AdminUpgradeableProxy.json"),
189-
".bytecode"
194+
string.concat(arcNetworkContractDir, "AdminUpgradeableProxy.sol/AdminUpgradeableProxy.json"),
195+
".bytecode.object"
190196
),
191197
abi.encode(address(validatorRegistry), address(0x0000000000000000000000000000000000000001), hex"")
192198
)
@@ -197,8 +203,8 @@ contract ArtifactHelper is Script {
197203
address poaManager = deployDeterministicContract(
198204
bytes.concat(
199205
loadBytecode(
200-
string.concat(arcNetworkContractDir, "validator-manager/PermissionedValidatorManager.sol/PermissionedValidatorManager.json"),
201-
".bytecode"
206+
string.concat(arcNetworkContractDir, "PermissionedValidatorManager.sol/PermissionedValidatorManager.json"),
207+
".bytecode.object"
202208
),
203209
abi.encode(address(validatorRegistryProxyAddr))
204210
)
@@ -208,35 +214,35 @@ contract ArtifactHelper is Script {
208214
// GasGuzzler
209215
address gasGuzzler = deployDeterministicContract(
210216
loadBytecode(
211-
string.concat(arcNetworkContractDir, "mocks/GasGuzzler.sol/GasGuzzler.json"),
212-
".bytecode"
217+
string.concat(arcNetworkContractDir, "GasGuzzler.sol/GasGuzzler.json"),
218+
".bytecode.object"
213219
)
214220
);
215221
vm.serializeString("output", "GasGuzzler", getJsonContractCode(address(gasGuzzler)));
216222

217223
// TestToken (ERC-20 for spammer load testing)
218224
address testToken = deployDeterministicContract(
219225
loadBytecode(
220-
string.concat(arcNetworkContractDir, "mocks/TestToken.sol/TestToken.json"),
221-
".bytecode"
226+
string.concat(arcNetworkContractDir, "TestToken.sol/TestToken.json"),
227+
".bytecode.object"
222228
)
223229
);
224230
vm.serializeString("output", "TestToken", getJsonContractCode(address(testToken)));
225231

226232
// Memo
227233
address memo = deployDeterministicContract(
228234
loadBytecode(
229-
string.concat(arcNetworkContractDir, "memo/Memo.sol/Memo.json"),
230-
".bytecode"
235+
string.concat(arcNetworkContractDir, "Memo.sol/Memo.json"),
236+
".bytecode.object"
231237
)
232238
);
233239
vm.serializeString("output", "Memo", getJsonContractCode(address(memo)));
234240

235241
// Multicall3From
236242
address multicall3From = deployDeterministicContract(
237243
loadBytecode(
238-
string.concat(arcNetworkContractDir, "batch/Multicall3From.sol/Multicall3From.json"),
239-
".bytecode"
244+
string.concat(arcNetworkContractDir, "Multicall3From.sol/Multicall3From.json"),
245+
".bytecode.object"
240246
)
241247
);
242248
return vm.serializeString("output", "Multicall3From", getJsonContractCode(address(multicall3From)));
@@ -302,7 +308,7 @@ contract ArtifactHelper is Script {
302308
vm.serializeString("output", "FiatTokenProxy", getJsonContractCode(fiatTokenProxyAddr));
303309

304310
// Deploy ArcNetwork contracts (extracted to avoid stack too deep)
305-
string memory output = deployArcNetworkContracts("contracts/out/hardhat/contracts/src/", validatorRegistryProxyAddr);
311+
string memory output = deployArcNetworkContracts("contracts/out/forge/", validatorRegistryProxyAddr);
306312
vm.writeJson(output, outputPath);
307313
}
308314
}

0 commit comments

Comments
 (0)