Skip to content

Commit 0d51b84

Browse files
Merge pull request #809 from ava-labs/dev
v1.3.0
2 parents 884bcd7 + c41d752 commit 0d51b84

Some content is hidden

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

59 files changed

+646
-395
lines changed

.ci/run_e2e_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ AVALANCHE_IMAGE="$AVALANCHE_IMAGE_REPO:$AVALANCHE_IMAGE_TAG"
1717
echo "Using Avalanche Image: $AVALANCHE_IMAGE"
1818

1919
DOCKER_REPO="avaplatform"
20-
BYZANTINE_IMAGE="$DOCKER_REPO/avalanche-byzantine:v0.1.5-rc.1"
21-
TEST_SUITE_IMAGE="$DOCKER_REPO/avalanche-testing:v0.10.5-rc.3"
20+
BYZANTINE_IMAGE="$DOCKER_REPO/avalanche-byzantine:v0.2.0-rc.1"
21+
TEST_SUITE_IMAGE="$DOCKER_REPO/avalanche-testing:v0.11.0-rc.1"
2222

2323
# Kurtosis Environment Parameters
2424
KURTOSIS_CORE_CHANNEL="1.0.3"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ keys/staker.*
5353
plugins/
5454

5555
scripts/ansible/*inventory.yml
56+
scripts/.build_image_gopath/

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# AvalancheGo
2-
![Avalanche](resources/AvalancheBlack.png?raw=true)
1+
<div align="center">
2+
<img src="resources/AvalancheLogoRed.png?raw=true">
3+
</div>
4+
5+
---
36

47
Official node implementation of the [Avalanche](https://avax.network) network -
58
a blockchains platform with high throughput, and blazing fast transactions.
@@ -34,14 +37,25 @@ The Avalanche binary, named `avalanchego`, is in the `build` directory.
3437

3538
### Docker Install
3639

37-
- Make sure you have docker installed on your machine (so commands like `docker run` etc. are available).
38-
- Build the docker image of latest avalanchego branch by `./scripts/build_image.sh`.
39-
- Check the built image by `docker image ls`, you should see some image tagged
40-
`avalanchego-xxxxxxxx`, where `xxxxxxxx` is the commit id of the Avalanche source it was built from.
41-
- Test Avalanche by `docker run -ti -p 9650:9650 -p 9651:9651 avalanchego-xxxxxxxx /avalanchego/build/avalanchego
42-
--network-id=local --staking-enabled=false --snow-sample-size=1 --snow-quorum-size=1`. (For a production deployment,
43-
you may want to extend the docker image with required credentials for
44-
staking and TLS.)
40+
Make sure docker is installed on the machine - so commands like `docker run` etc. are available.
41+
42+
Building the docker image of latest avalanchego branch can be done by running:
43+
44+
```sh
45+
./scripts/build_image.sh
46+
```
47+
48+
To check the built image, run:
49+
50+
```sh
51+
docker image ls
52+
```
53+
54+
The image should be tagged as `avaplatform/avalanchego:xxxxxxxx`, where `xxxxxxxx` is the shortened commit of the Avalanche source it was built from. To run the avalanche node, run:
55+
56+
```sh
57+
docker run -ti -p 9650:9650 -p 9651:9651 avaplatform/avalanchego:xxxxxxxx /avalanchego/build/avalanchego
58+
```
4559

4660
## Running Avalanche
4761

api/admin/performance.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"os"
99
"runtime"
1010
"runtime/pprof"
11+
12+
"github.com/ava-labs/avalanchego/utils/perms"
1113
)
1214

1315
const (
@@ -47,7 +49,7 @@ func (p *Performance) StartCPUProfiler() error {
4749
return errCPUProfilerRunning
4850
}
4951

50-
file, err := os.Create(p.cpuProfileName)
52+
file, err := perms.Create(p.cpuProfileName, perms.ReadWrite)
5153
if err != nil {
5254
return err
5355
}
@@ -75,7 +77,7 @@ func (p *Performance) StopCPUProfiler() error {
7577

7678
// MemoryProfile dumps the current memory utilization of this node
7779
func (p *Performance) MemoryProfile() error {
78-
file, err := os.Create(p.memProfileName)
80+
file, err := perms.Create(p.memProfileName, perms.ReadWrite)
7981
if err != nil {
8082
return err
8183
}
@@ -89,7 +91,7 @@ func (p *Performance) MemoryProfile() error {
8991

9092
// LockProfile dumps the current lock statistics of this node
9193
func (p *Performance) LockProfile() error {
92-
file, err := os.Create(p.lockProfileName)
94+
file, err := perms.Create(p.lockProfileName, perms.ReadWrite)
9395
if err != nil {
9496
return err
9597
}

api/admin/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package admin
55

66
import (
77
"errors"
8-
"io/ioutil"
98
"net/http"
109

1110
"github.com/gorilla/rpc/v2"
@@ -15,6 +14,7 @@ import (
1514
"github.com/ava-labs/avalanchego/ids"
1615
"github.com/ava-labs/avalanchego/snow/engine/common"
1716
"github.com/ava-labs/avalanchego/utils/logging"
17+
"github.com/ava-labs/avalanchego/utils/perms"
1818

1919
cjson "github.com/ava-labs/avalanchego/utils/json"
2020
)
@@ -159,5 +159,5 @@ func (service *Admin) Stacktrace(_ *http.Request, _ *struct{}, reply *api.Succes
159159

160160
reply.Success = true
161161
stacktrace := []byte(logging.Stacktrace{Global: true}.String())
162-
return ioutil.WriteFile(stacktraceFile, stacktrace, 0600)
162+
return perms.WriteFile(stacktraceFile, stacktrace, perms.ReadWrite)
163163
}

0 commit comments

Comments
 (0)