Skip to content

Releases/v2.1.0 #1263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
500f8bf
Merge pull request #1250 from razor-network/main
Yashk767 Oct 1, 2024
bb75173
refactor: added context with timeout to retry mechanism (#1235)
Yashk767 Oct 9, 2024
c4e3e3b
refactor: replaced retry implementation inside functions with generic…
Yashk767 Oct 9, 2024
0df6525
fix: added context parameter to functions to sync with updated generi…
Yashk767 Oct 10, 2024
6917916
refactor: replaced SKL with sFuel as a gas token in logs (#1253)
Yashk767 Oct 15, 2024
72b6be4
feat: added commitment verification layer for data during reveal afte…
Yashk767 Oct 17, 2024
b0751a5
chore: updated retry parameters to check transaction mined status (#1…
Yashk767 Oct 22, 2024
98ef5c1
chore: revised max/min value for config parameters (#1257)
Yashk767 Oct 29, 2024
64e3128
chore: updated go and geth version (#1259)
Yashk767 Nov 4, 2024
52d8d2a
feat: Implemented RPC Manager for RPC calls (#1260)
Yashk767 Dec 13, 2024
fd91fc4
refactor: removed fatal logs from GetTxnOpts() (#1261)
Yashk767 Dec 13, 2024
c12a45a
fix: removed cancel context being called immediately after creation (…
Yashk767 Feb 20, 2025
0243b54
refactor: added tests for rpc module (#1266)
Yashk767 Feb 26, 2025
ce4180e
fix: switch RPC if block number is less than last recorded block numb…
Yashk767 Feb 27, 2025
96f1e28
refactor: fetched block number from block monitor module in voting pr…
Yashk767 Feb 28, 2025
486a93a
fix: added validation to check if index to fetch element is within li…
Yashk767 Feb 28, 2025
4641fd8
fix: setconfig command fails on new vm for the first run of a staker …
Yashk767 Mar 12, 2025
33c6ce4
ci: updated actions/cache from v2 to v4 (#1272)
Yashk767 Mar 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 27 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,24 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
go-version: 1.23
- name: Install Dependencies
run: >
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum

sudo apt-get update

sudo apt-get install -y npm ethereum

npm install
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/mattn/[email protected]
go install github.com/ory/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]

go get -d github.com/ethereum/[email protected] \

&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \

&& go install github.com/mattn/[email protected] \

&& go install github.com/ory/[email protected] \

&& go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: Run make setup for mainnet
run: make setup
- name: Run gofmt
Expand All @@ -70,7 +62,7 @@ jobs:
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=coverage.txt -service=github
- uses: bissolli/gh-action-persist-workspace@v1
- uses: bissolli/gh-action-persist-workspace@v2
with:
action: persist

Expand All @@ -83,34 +75,25 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
go-version: 1.23

- name: Install Dependencies
run: >
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum

sudo apt-get update

sudo apt-get install -y npm ethereum

npm install

go get -d github.com/ethereum/[email protected] \

&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \

&& go install github.com/mattn/[email protected] \

&& go install github.com/ory/[email protected] \

&& go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/mattn/[email protected]
go install github.com/ory/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]

- name: Create AMD Artifact
run: |
Expand All @@ -122,7 +105,7 @@ jobs:
mv razor_go.linux-amd64.tar.gz ../../

- name: Upload AMD Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: razor_go.linux-amd64.tar.gz
path: razor_go.linux-amd64.tar.gz
Expand All @@ -134,34 +117,25 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
go-version: 1.23

- name: Install Dependencies
run: >
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum

sudo apt-get update

sudo apt-get install -y npm ethereum

npm install

go get -d github.com/ethereum/[email protected] \

&& go install github.com/ethereum/go-ethereum/cmd/[email protected] \

&& go install github.com/mattn/[email protected] \

&& go install github.com/ory/[email protected] \

&& go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/mattn/[email protected]
go install github.com/ory/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]

- name: Create ARM Artifact
run: |
Expand All @@ -173,7 +147,7 @@ jobs:
mv razor_go.linux-arm64.tar.gz ../../

- name: Upload ARM Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: razor_go.linux-arm64.tar.gz
path: razor_go.linux-arm64.tar.gz
Expand All @@ -192,17 +166,17 @@ jobs:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Download Artifacts AMD
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: razor_go.linux-amd64.tar.gz

- name: Download Artifacts ARM
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: razor_go.linux-arm64.tar.gz

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
go-version: 1.23
- name: Cache npm modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Cache Go dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -45,11 +45,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y npm ethereum
npm install
go get -d github.com/ethereum/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/mattn/[email protected]
go install github.com/ory/[email protected]
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0

- name: Run make setup for testnet
run: make setup-testnet
Expand All @@ -69,7 +68,7 @@ jobs:
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=coverage.txt -service=github
- uses: bissolli/gh-action-persist-workspace@v1
- uses: bissolli/gh-action-persist-workspace@v2
with:
action: persist

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
go-version: 1.23
- name: Cache npm modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Cache Go dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -42,11 +42,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y npm ethereum
npm install
go get -d github.com/ethereum/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/mattn/[email protected]
go install github.com/ory/[email protected]
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0

- name: Run make setup for mainnet
run: make setup
Expand All @@ -66,7 +65,7 @@ jobs:
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=coverage.txt -service=github
- uses: bissolli/gh-action-persist-workspace@v1
- uses: bissolli/gh-action-persist-workspace@v2
with:
action: persist

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.mainnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM golang:1.21.1-alpine AS go
FROM ethereum/client-go:alltools-v1.12.2 AS ethereum
FROM golang:1.23-alpine AS go
FROM ethereum/client-go:alltools-v1.14.11 AS ethereum

FROM node:18.18.0-alpine AS builder

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.testnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM golang:1.21.1-alpine AS go
FROM ethereum/client-go:alltools-v1.12.2 AS ethereum
FROM golang:1.23-alpine AS go
FROM ethereum/client-go:alltools-v1.14.11 AS ethereum

FROM node:18.18.0-alpine AS builder

Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ docker exec -it razor-go razor <command>

### Prerequisites to building the source

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

```
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>
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>
```

Example:
Expand Down Expand Up @@ -190,6 +190,23 @@ Password:

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

### Import Endpoints

You can import the endpoints to file `$HOME/.razor/endpoints.json` on your local by using the `importEndpoints` command.
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.

razor cli

```
$ ./razor importEndpoints
```

docker

```
docker exec -it razor-go razor importEndpoints
```

### Stake

If you have a minimum of 1000 razors in your account, you can stake those using the addStake command.
Expand Down
2 changes: 1 addition & 1 deletion accounts/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
)

var log = logger.NewLogger()
var log = logger.GetLogger()

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