Skip to content

Commit f1d1ff2

Browse files
committed
Squashed commit of the following:
commit 7687360 Author: Ng Wei Han <[email protected]> Date: Thu Dec 12 18:54:32 2024 +0800 Remove size in OrderedSet (#2319) commit 65b7507 Author: Ng Wei Han <[email protected]> Date: Thu Dec 12 18:20:55 2024 +0800 Fix and refactor trie proof logics (#2252) commit 2b1b219 Author: aleven1999 <[email protected]> Date: Thu Dec 12 12:11:28 2024 +0400 Remove unused code (#2318) commit 0a21162 Author: Daniil Ankushin <[email protected]> Date: Thu Dec 12 00:04:08 2024 +0700 Remove unused code (#2317) commit 8bf9be9 Author: Rian Hughes <[email protected]> Date: Wed Dec 11 14:11:22 2024 +0200 update invoke v3 txn validation to require sender_address (#2308) commit 91d0f8e Author: Kirill <[email protected]> Date: Wed Dec 11 16:01:10 2024 +0400 Add schema_version to output of db info command (#2309) commit 60e8cc9 Author: AnavarKh <[email protected]> Date: Wed Dec 11 16:04:31 2024 +0530 Update download link for Juno snapshots from dev to io in Readme file (#2314) commit 8862de1 Author: wojciechos <[email protected]> Date: Wed Dec 11 11:20:02 2024 +0100 Improve binary build workflow for cross-platform releases (#2315) - Add proper architecture handling in matrix configuration - Implement caching for Go modules and Rust dependencies - Streamline dependency installation for both Linux and macOS - Improve binary artifact handling and checksums - Add retention policy for build artifacts - Split build steps for better clarity and maintainability This update ensures more reliable and efficient binary builds across all supported platforms. commit e75e504 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 11 07:35:16 2024 +0000 Bump nanoid from 3.3.7 to 3.3.8 in /docs in the npm_and_yarn group across 1 directory (#2316) Bump nanoid in /docs in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the /docs directory: [nanoid](https://github.com/ai/nanoid). Updates `nanoid` from 3.3.7 to 3.3.8 - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 3a7abeb Author: wojciechos <[email protected]> Date: Tue Dec 10 21:52:49 2024 +0100 Skip error logs for FGW responses with NOT_RECEIVED status (#2303) * Add NotReceived case handling in adaptTransactionStatus --------- Co-authored-by: Rian Hughes <[email protected]>
1 parent f997edf commit f1d1ff2

File tree

28 files changed

+1650
-2882
lines changed

28 files changed

+1650
-2882
lines changed

.github/workflows/build-binaries.yml

+41-16
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ jobs:
1818
matrix:
1919
include:
2020
- os: ubuntu-latest
21+
arch: amd64
2122
- os: macos-13
23+
arch: amd64
2224
- os: ubuntu-arm64-4-core
25+
arch: arm64
2326
- os: macos-latest
27+
arch: arm64
2428
runs-on: ${{ matrix.os }}
2529

2630
steps:
@@ -29,46 +33,67 @@ jobs:
2933
with:
3034
fetch-depth: 0
3135

36+
- name: Set up Go
37+
uses: actions/setup-go@v5
38+
with:
39+
go-version-file: go.mod
40+
cache: true
41+
42+
- name: Set up Rust
43+
uses: dtolnay/rust-toolchain@stable
44+
45+
- name: Cache Rust dependencies
46+
uses: Swatinem/rust-cache@v2
47+
with:
48+
workspaces: |
49+
vm/rust
50+
core/rust
51+
starknet/compiler/rust
52+
3253
- name: Get latest tag
3354
run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV
3455

3556
- name: Get artifact name
36-
run: echo "ARTIFACT_NAME=juno-${{ env.TAG }}-${{ runner.os }}-$(uname -m)" >> $GITHUB_ENV
57+
run: |
58+
OS_NAME=$([ "${{ runner.os }}" == "macOS" ] && echo "darwin" || echo "linux")
59+
echo "ARTIFACT_NAME=juno-${{ env.TAG }}-${OS_NAME}-${{ matrix.arch }}" >> $GITHUB_ENV
3760
3861
- name: Install dependencies (Linux)
3962
if: runner.os == 'Linux'
40-
run: sudo apt-get update -qq && sudo apt-get install -y upx-ucl build-essential cargo git golang libjemalloc-dev libjemalloc2 -y
63+
run: |
64+
sudo apt-get update -qq
65+
sudo apt-get install -y upx-ucl libjemalloc-dev libjemalloc2 libbz2-dev
4166
4267
- name: Install dependencies (macOS)
4368
if: runner.os == 'macOS'
44-
run: brew install cargo-c jemalloc
45-
46-
- name: Set up Go
47-
uses: actions/setup-go@v5
48-
with:
49-
go-version-file: go.mod
69+
run: brew install jemalloc
5070

51-
- name: Build Juno
71+
- name: Build binary
72+
run: make juno
73+
74+
- name: Compress binary (Linux)
75+
if: runner.os == 'Linux'
5276
run: |
53-
make juno
54-
if [[ "${{ runner.os }}" != "macOS" ]]; then
55-
upx build/juno
56-
fi
77+
upx build/juno
5778
mv build/juno ${{ env.ARTIFACT_NAME }}
5879
59-
- name: Generate Checksum
60-
id: checksum
80+
- name: Prepare binary (macOS)
81+
if: runner.os == 'macOS'
82+
run: mv build/juno ${{ env.ARTIFACT_NAME }}
83+
84+
- name: Generate checksum
6185
run: |
6286
if [[ "${{ runner.os }}" == "macOS" ]]; then
6387
shasum -a 256 ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
6488
else
6589
sha256sum ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
6690
fi
6791
68-
- name: Upload Artifact
92+
- name: Upload artifact
6993
uses: actions/upload-artifact@v4
7094
with:
7195
name: ${{ env.ARTIFACT_NAME }}
7296
path: |
7397
${{ env.ARTIFACT_NAME }}
7498
${{ env.ARTIFACT_NAME }}.sha256
99+
retention-days: 30

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -112,32 +112,32 @@ Use the provided snapshots to quickly sync your Juno node with the current state
112112
113113
| Version | Download Link |
114114
| ------- | ------------- |
115-
| **>=v0.9.2** | [**juno_mainnet.tar**](https://juno-snapshots.nethermind.dev/files/mainnet/latest) |
115+
| **>=v0.9.2** | [**juno_mainnet.tar**](https://juno-snapshots.nethermind.io/files/mainnet/latest) |
116116
117117
#### Sepolia
118118
119119
| Version | Download Link |
120120
| ------- | ------------- |
121-
| **>=v0.9.2** | [**juno_sepolia.tar**](https://juno-snapshots.nethermind.dev/files/sepolia/latest) |
121+
| **>=v0.9.2** | [**juno_sepolia.tar**](https://juno-snapshots.nethermind.io/files/sepolia/latest) |
122122
123123
#### Sepolia-Integration
124124
125125
| Version | Download Link |
126126
| ------- | ------------- |
127-
| **>=v0.9.2** | [**juno_sepolia_integration.tar**](https://juno-snapshots.nethermind.dev/files/sepolia-integration/latest) |
127+
| **>=v0.9.2** | [**juno_sepolia_integration.tar**](https://juno-snapshots.nethermind.io/files/sepolia-integration/latest) |
128128
129129
### Getting the size for each snapshot
130130
```console
131131
$date
132132
Thu 1 Aug 2024 09:49:30 BST
133133
134-
$curl -s -I -L https://juno-snapshots.nethermind.dev/files/mainnet/latest | gawk -v IGNORECASE=1 '/^Content-Length/ { printf "%.2f GB\n", $2/1024/1024/1024 }'
134+
$curl -s -I -L https://juno-snapshots.nethermind.io/files/mainnet/latest | gawk -v IGNORECASE=1 '/^Content-Length/ { printf "%.2f GB\n", $2/1024/1024/1024 }'
135135
172.47 GB
136136
137-
$curl -s -I -L https://juno-snapshots.nethermind.dev/files/sepolia/latest | gawk -v IGNORECASE=1 '/^Content-Length/ { printf "%.2f GB\n", $2/1024/1024/1024 }'
137+
$curl -s -I -L https://juno-snapshots.nethermind.io/files/sepolia/latest | gawk -v IGNORECASE=1 '/^Content-Length/ { printf "%.2f GB\n", $2/1024/1024/1024 }'
138138
5.67 GB
139139
140-
$curl -s -I -L https://juno-snapshots.nethermind.dev/files/sepolia-integration/latest | gawk -v IGNORECASE=1 '/^Content-Length/ { printf "%.2f GB\n", $2/1024/1024/1024 }'
140+
$curl -s -I -L https://juno-snapshots.nethermind.io/files/sepolia-integration/latest | gawk -v IGNORECASE=1 '/^Content-Length/ { printf "%.2f GB\n", $2/1024/1024/1024 }'
141141
2.4 GB
142142
```
143143
@@ -148,7 +148,7 @@ $curl -s -I -L https://juno-snapshots.nethermind.dev/files/sepolia-integration/l
148148
Fetch the snapshot from the provided URL:
149149
150150
```bash
151-
wget -O juno_mainnet.tar https://juno-snapshots.nethermind.dev/files/mainnet/latest
151+
wget -O juno_mainnet.tar https://juno-snapshots.nethermind.io/files/mainnet/latest
152152
```
153153
154154
2. **Prepare Directory**

adapters/vm2core/vm2core.go

-34
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,6 @@ import (
1010
"github.com/ethereum/go-ethereum/common"
1111
)
1212

13-
func AdaptExecutionResources(resources *vm.ExecutionResources) *core.ExecutionResources {
14-
return &core.ExecutionResources{
15-
BuiltinInstanceCounter: core.BuiltinInstanceCounter{
16-
Pedersen: resources.Pedersen,
17-
RangeCheck: resources.RangeCheck,
18-
Bitwise: resources.Bitwise,
19-
Ecsda: resources.Ecdsa,
20-
EcOp: resources.EcOp,
21-
Keccak: resources.Keccak,
22-
Poseidon: resources.Poseidon,
23-
SegmentArena: resources.SegmentArena,
24-
Output: resources.Output,
25-
AddMod: resources.AddMod,
26-
MulMod: resources.MulMod,
27-
RangeCheck96: resources.RangeCheck96,
28-
},
29-
MemoryHoles: resources.MemoryHoles,
30-
Steps: resources.Steps,
31-
DataAvailability: adaptDA(resources.DataAvailability),
32-
TotalGasConsumed: nil, // todo: fill after 0.13.2
33-
}
34-
}
35-
3613
func AdaptOrderedEvent(event vm.OrderedEvent) *core.Event {
3714
return &core.Event{
3815
From: event.From,
@@ -62,14 +39,3 @@ func AdaptOrderedEvents(events []vm.OrderedEvent) []*core.Event {
6239
})
6340
return utils.Map(events, AdaptOrderedEvent)
6441
}
65-
66-
func adaptDA(da *vm.DataAvailability) *core.DataAvailability {
67-
if da == nil {
68-
return nil
69-
}
70-
71-
return &core.DataAvailability{
72-
L1Gas: da.L1Gas,
73-
L1DataGas: da.L1DataGas,
74-
}
75-
}

adapters/vm2core/vm2core_test.go

-32
Original file line numberDiff line numberDiff line change
@@ -68,35 +68,3 @@ func TestAdaptOrderedMessagesToL1(t *testing.T) {
6868
vm2core.AdaptOrderedMessageToL1(messages[0]),
6969
}, vm2core.AdaptOrderedMessagesToL1(messages))
7070
}
71-
72-
func TestAdaptExecutionResources(t *testing.T) {
73-
require.Equal(t, &core.ExecutionResources{
74-
BuiltinInstanceCounter: core.BuiltinInstanceCounter{
75-
Pedersen: 1,
76-
RangeCheck: 2,
77-
Bitwise: 3,
78-
Ecsda: 4,
79-
EcOp: 5,
80-
Keccak: 6,
81-
Poseidon: 7,
82-
SegmentArena: 8,
83-
Output: 11,
84-
},
85-
MemoryHoles: 9,
86-
Steps: 10,
87-
}, vm2core.AdaptExecutionResources(&vm.ExecutionResources{
88-
ComputationResources: vm.ComputationResources{
89-
Pedersen: 1,
90-
RangeCheck: 2,
91-
Bitwise: 3,
92-
Ecdsa: 4,
93-
EcOp: 5,
94-
Keccak: 6,
95-
Poseidon: 7,
96-
SegmentArena: 8,
97-
MemoryHoles: 9,
98-
Steps: 10,
99-
Output: 11,
100-
},
101-
}))
102-
}

cmd/juno/dbcmd.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/NethermindEth/juno/core/felt"
1111
"github.com/NethermindEth/juno/db"
1212
"github.com/NethermindEth/juno/db/pebble"
13+
"github.com/NethermindEth/juno/migration"
1314
"github.com/NethermindEth/juno/utils"
1415
"github.com/olekukonko/tablewriter"
1516
"github.com/spf13/cobra"
@@ -21,6 +22,7 @@ const (
2122

2223
type DBInfo struct {
2324
Network string `json:"network"`
25+
SchemaVersion uint64 `json:"schema_version"`
2426
ChainHeight uint64 `json:"chain_height"`
2527
LatestBlockHash *felt.Felt `json:"latest_block_hash"`
2628
LatestStateRoot *felt.Felt `json:"latest_state_root"`
@@ -84,7 +86,7 @@ func dbInfo(cmd *cobra.Command, args []string) error {
8486
defer database.Close()
8587

8688
chain := blockchain.New(database, nil)
87-
info := DBInfo{}
89+
var info DBInfo
8890

8991
// Get the latest block information
9092
headBlock, err := chain.Head()
@@ -97,6 +99,12 @@ func dbInfo(cmd *cobra.Command, args []string) error {
9799
return fmt.Errorf("failed to get the state update: %v", err)
98100
}
99101

102+
schemaMeta, err := migration.SchemaMetadata(database)
103+
if err != nil {
104+
return fmt.Errorf("failed to get schema metadata: %v", err)
105+
}
106+
107+
info.SchemaVersion = schemaMeta.Version
100108
info.Network = getNetwork(headBlock, stateUpdate.StateDiff)
101109
info.ChainHeight = headBlock.Number
102110
info.LatestBlockHash = headBlock.Hash

0 commit comments

Comments
 (0)