Skip to content

Commit 448bb29

Browse files
authored
Merge pull request #1263 from razor-network/releases/v2.1.0
Releases/v2.1.0
2 parents d4aa054 + 33c6ce4 commit 448bb29

File tree

154 files changed

+6640
-5185
lines changed

Some content is hidden

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

154 files changed

+6640
-5185
lines changed

.github/workflows/ci.yml

+27-53
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,24 @@ jobs:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424
- name: Setup Node.js
25-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@v4
2626
with:
2727
node-version: "20"
2828
- name: Setup Go
2929
uses: actions/setup-go@v2
3030
with:
31-
go-version: 1.21
31+
go-version: 1.23
3232
- name: Install Dependencies
33-
run: >
33+
run: |
3434
sudo add-apt-repository -y ppa:ethereum/ethereum
35-
3635
sudo apt-get update
37-
3836
sudo apt-get install -y npm ethereum
39-
4037
npm install
38+
go install github.com/ethereum/go-ethereum/cmd/[email protected]
39+
go install github.com/mattn/[email protected]
40+
go install github.com/ory/[email protected]
41+
go install github.com/golangci/golangci-lint/cmd/[email protected]
4142
42-
go get -d github.com/ethereum/[email protected] \
43-
44-
&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \
45-
46-
&& go install github.com/mattn/[email protected] \
47-
48-
&& go install github.com/ory/[email protected] \
49-
50-
&& go install github.com/golangci/golangci-lint/cmd/[email protected]
5143
- name: Run make setup for mainnet
5244
run: make setup
5345
- name: Run gofmt
@@ -70,7 +62,7 @@ jobs:
7062
env:
7163
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7264
run: goveralls -coverprofile=coverage.txt -service=github
73-
- uses: bissolli/gh-action-persist-workspace@v1
65+
- uses: bissolli/gh-action-persist-workspace@v2
7466
with:
7567
action: persist
7668

@@ -83,34 +75,25 @@ jobs:
8375
uses: actions/checkout@v4
8476

8577
- name: Setup Node.js
86-
uses: actions/setup-node@v3
78+
uses: actions/setup-node@v4
8779
with:
8880
node-version: "20"
8981

9082
- name: Setup Go
9183
uses: actions/setup-go@v2
9284
with:
93-
go-version: 1.21
85+
go-version: 1.23
9486

9587
- name: Install Dependencies
96-
run: >
88+
run: |
9789
sudo add-apt-repository -y ppa:ethereum/ethereum
98-
9990
sudo apt-get update
100-
10191
sudo apt-get install -y npm ethereum
102-
10392
npm install
104-
105-
go get -d github.com/ethereum/[email protected] \
106-
107-
&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \
108-
109-
&& go install github.com/mattn/[email protected] \
110-
111-
&& go install github.com/ory/[email protected] \
112-
113-
&& go install github.com/golangci/golangci-lint/cmd/[email protected]
93+
go install github.com/ethereum/go-ethereum/cmd/[email protected]
94+
go install github.com/mattn/[email protected]
95+
go install github.com/ory/[email protected]
96+
go install github.com/golangci/golangci-lint/cmd/[email protected]
11497
11598
- name: Create AMD Artifact
11699
run: |
@@ -122,7 +105,7 @@ jobs:
122105
mv razor_go.linux-amd64.tar.gz ../../
123106
124107
- name: Upload AMD Artifact
125-
uses: actions/upload-artifact@v3
108+
uses: actions/upload-artifact@v4
126109
with:
127110
name: razor_go.linux-amd64.tar.gz
128111
path: razor_go.linux-amd64.tar.gz
@@ -134,34 +117,25 @@ jobs:
134117
uses: actions/checkout@v4
135118

136119
- name: Setup Node.js
137-
uses: actions/setup-node@v3
120+
uses: actions/setup-node@v4
138121
with:
139122
node-version: "20"
140123

141124
- name: Setup Go
142125
uses: actions/setup-go@v2
143126
with:
144-
go-version: 1.21
127+
go-version: 1.23
145128

146129
- name: Install Dependencies
147-
run: >
130+
run: |
148131
sudo add-apt-repository -y ppa:ethereum/ethereum
149-
150132
sudo apt-get update
151-
152133
sudo apt-get install -y npm ethereum
153-
154134
npm install
155-
156-
go get -d github.com/ethereum/[email protected] \
157-
158-
&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \
159-
160-
&& go install github.com/mattn/[email protected] \
161-
162-
&& go install github.com/ory/[email protected] \
163-
164-
&& go install github.com/golangci/golangci-lint/cmd/[email protected]
135+
go install github.com/ethereum/go-ethereum/cmd/[email protected]
136+
go install github.com/mattn/[email protected]
137+
go install github.com/ory/[email protected]
138+
go install github.com/golangci/golangci-lint/cmd/[email protected]
165139
166140
- name: Create ARM Artifact
167141
run: |
@@ -173,7 +147,7 @@ jobs:
173147
mv razor_go.linux-arm64.tar.gz ../../
174148
175149
- name: Upload ARM Artifact
176-
uses: actions/upload-artifact@v3
150+
uses: actions/upload-artifact@v4
177151
with:
178152
name: razor_go.linux-arm64.tar.gz
179153
path: razor_go.linux-arm64.tar.gz
@@ -192,17 +166,17 @@ jobs:
192166
fetch-depth: 0
193167

194168
- name: Setup Node.js
195-
uses: actions/setup-node@v3
169+
uses: actions/setup-node@v4
196170
with:
197171
node-version: "20"
198172

199173
- name: Download Artifacts AMD
200-
uses: actions/download-artifact@v3
174+
uses: actions/download-artifact@v4
201175
with:
202176
name: razor_go.linux-amd64.tar.gz
203177

204178
- name: Download Artifacts ARM
205-
uses: actions/download-artifact@v3
179+
uses: actions/download-artifact@v4
206180
with:
207181
name: razor_go.linux-arm64.tar.gz
208182

.github/workflows/develop.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
1818
- name: Setup Node.js
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: "20"
2222
- name: Setup Go
2323
uses: actions/setup-go@v2
2424
with:
25-
go-version: 1.21
25+
go-version: 1.23
2626
- name: Cache npm modules
27-
uses: actions/cache@v2
27+
uses: actions/cache@v4
2828
with:
2929
path: ~/.npm
3030
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3131
restore-keys: |
3232
${{ runner.os }}-node-
3333
3434
- name: Cache Go dependencies
35-
uses: actions/cache@v2
35+
uses: actions/cache@v4
3636
with:
3737
path: ~/go/pkg/mod
3838
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@@ -45,11 +45,10 @@ jobs:
4545
sudo apt-get update
4646
sudo apt-get install -y npm ethereum
4747
npm install
48-
go get -d github.com/ethereum/[email protected]
49-
go install github.com/ethereum/go-ethereum/cmd/[email protected]
48+
go install github.com/ethereum/go-ethereum/cmd/[email protected]
5049
go install github.com/mattn/[email protected]
5150
go install github.com/ory/[email protected]
52-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
51+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
5352
5453
- name: Run make setup for testnet
5554
run: make setup-testnet
@@ -69,7 +68,7 @@ jobs:
6968
env:
7069
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7170
run: goveralls -coverprofile=coverage.txt -service=github
72-
- uses: bissolli/gh-action-persist-workspace@v1
71+
- uses: bissolli/gh-action-persist-workspace@v2
7372
with:
7473
action: persist
7574

.github/workflows/release.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515
- name: Setup Node.js
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
1818
node-version: "20"
1919
- name: Setup Go
2020
uses: actions/setup-go@v2
2121
with:
22-
go-version: 1.21
22+
go-version: 1.23
2323
- name: Cache npm modules
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
with:
2626
path: ~/.npm
2727
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2828
restore-keys: |
2929
${{ runner.os }}-node-
3030
3131
- name: Cache Go dependencies
32-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3333
with:
3434
path: ~/go/pkg/mod
3535
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@@ -42,11 +42,10 @@ jobs:
4242
sudo apt-get update
4343
sudo apt-get install -y npm ethereum
4444
npm install
45-
go get -d github.com/ethereum/[email protected]
46-
go install github.com/ethereum/go-ethereum/cmd/[email protected]
45+
go install github.com/ethereum/go-ethereum/cmd/[email protected]
4746
go install github.com/mattn/[email protected]
4847
go install github.com/ory/[email protected]
49-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
48+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
5049
5150
- name: Run make setup for mainnet
5251
run: make setup
@@ -66,7 +65,7 @@ jobs:
6665
env:
6766
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6867
run: goveralls -coverprofile=coverage.txt -service=github
69-
- uses: bissolli/gh-action-persist-workspace@v1
68+
- uses: bissolli/gh-action-persist-workspace@v2
7069
with:
7170
action: persist
7271

Dockerfile.mainnet

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM golang:1.21.1-alpine AS go
2-
FROM ethereum/client-go:alltools-v1.12.2 AS ethereum
1+
FROM golang:1.23-alpine AS go
2+
FROM ethereum/client-go:alltools-v1.14.11 AS ethereum
33

44
FROM node:18.18.0-alpine AS builder
55

Dockerfile.testnet

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM golang:1.21.1-alpine AS go
2-
FROM ethereum/client-go:alltools-v1.12.2 AS ethereum
1+
FROM golang:1.23-alpine AS go
2+
FROM ethereum/client-go:alltools-v1.14.11 AS ethereum
33

44
FROM node:18.18.0-alpine AS builder
55

README.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ docker exec -it razor-go razor <command>
6464

6565
### Prerequisites to building the source
6666

67-
- Golang 1.21.1 or later must be installed.
67+
- Golang 1.23 or later must be installed.
6868
- Latest stable version of node is required.
6969
- Mac users with Silicon chips should use Node 18.18.0 LTS or later versions
7070
- `geth` and `abigen` should be installed. (Skip this step if you don't want to fetch the bindings and build from scratch)
@@ -118,7 +118,7 @@ $ ./razor setConfig --provider <rpc_provider> --gasmultiplier <multiplier_value>
118118
docker
119119

120120
```
121-
docker exec -it razor-go razor setConfig --provider <rpc_provider> --alternateProvider <alternate_rpc_provider> --gasmultiplier <multiplier_value> --buffer <buffer_percentage> --wait <wait_for_n_blocks> --gasprice <gas_price> --logLevel <debug_or_info> --gasLimit <gas_limit_multiplier> --rpcTimeout <rpc_timeout> --httpTimeout <http_timeout> --logFileMaxSize <file_max_size> --logFileMaxBackups <file_max_backups> --logFileMaxAge <file_max_age>
121+
docker exec -it razor-go razor setConfig --provider <rpc_provider> --gasmultiplier <multiplier_value> --buffer <buffer_percentage> --wait <wait_for_n_blocks> --gasprice <gas_price> --logLevel <debug_or_info> --gasLimit <gas_limit_multiplier> --rpcTimeout <rpc_timeout> --httpTimeout <http_timeout> --logFileMaxSize <file_max_size> --logFileMaxBackups <file_max_backups> --logFileMaxAge <file_max_age>
122122
```
123123

124124
Example:
@@ -190,6 +190,23 @@ Password:
190190

191191
_Before staking on Razor Network, please ensure your account has sFUEL and RAZOR. For testnet RAZOR, please contact us on Discord._
192192

193+
### Import Endpoints
194+
195+
You can import the endpoints to file `$HOME/.razor/endpoints.json` on your local by using the `importEndpoints` command.
196+
This command imports multiple providers along with the user input provider, which are then sorted according to the best performance. The best provider is thus chosen by the RPC manager and will be used to make the RPC calls.
197+
198+
razor cli
199+
200+
```
201+
$ ./razor importEndpoints
202+
```
203+
204+
docker
205+
206+
```
207+
docker exec -it razor-go razor importEndpoints
208+
```
209+
193210
### Stake
194211

195212
If you have a minimum of 1000 razors in your account, you can stake those using the addStake command.

accounts/accounts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"strings"
1414
)
1515

16-
var log = logger.NewLogger()
16+
var log = logger.GetLogger()
1717

1818
//This function takes path and password as input and returns new account
1919
func (am *AccountManager) CreateAccount(keystorePath string, password string) accounts.Account {

0 commit comments

Comments
 (0)