Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
version: 'latest'
args: -v

vet-check:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Run unit tests
run: go test -short ./... -timeout=20m
run: go test -short ./... -timeout=30m

- name: Test State - Race
run: make test-state-race
Expand Down
16 changes: 10 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ linters-settings:
# - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
# - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
# - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
golint:
revive:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
Expand Down Expand Up @@ -187,10 +187,10 @@ linters:
- govet
- gofmt
- goimports
- gosimple
- varcheck
- misspell
- ineffassign
- gosimple
- unconvert
- goconst
- errcheck
Expand All @@ -200,7 +200,7 @@ linters:
- gosec
- bodyclose
- goprintffuncname
- golint
- revive
- depguard
- gocyclo
- unparam
Expand Down Expand Up @@ -245,15 +245,19 @@ issues:
text: "SA9003:"

- linters:
- golint
- gosimple
text: "S1025:"

- linters:
- revive
text: "package comment should be of the form"

- linters:
- golint
- revive
text: "don't use ALL_CAPS in Go names;"

- linters:
- golint
- revive
text: "don't use underscores in Go names;"

- linters:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test:
@echo " > \033[32mRunning tests...\033[0m "
#GOBIN=$(PWD)/bin go run scripts/ci.go test
git lfs pull
go test -short -coverprofile c.out ./... -timeout=20m
go test -short -coverprofile c.out ./... -timeout=30m

## it-stable: Runs Integration Tests Stable mode
it-stable:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/overview/host-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The **state service** is the source of truth for all chain and node state.

## Block production

<img src="../../../assets/img/block_production.png" alt="block production" />
<img src="../../assets/img/block_production.png" alt="block production" />

A block is broken down into two sections, **the header** & **the body**.

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/integrate/connect-to-polkadot-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ You'll need to setup the polkadot.js/apps to use a custom endpoint to connect to

Once you've opened the app in your browser, you should see it connected to the Polkadot network:

<img src= "../../assets/tutorial/connect-1.png" />
<img src= "../assets/tutorial/connect-1.png" />

In the top left hand corner, click the logo to open the network selection modal:

<img src="../../assets/tutorial/connect-2.png" />
<img src="../assets/tutorial/connect-2.png" />

Next, at the bottom of this menu is a "Development" dropdown, click to open that

<img src="../../assets/tutorial/connect-3.png" />
<img src="../assets/tutorial/connect-3.png" />

Now you should see a text area with the label "custom endpoint", here you add your local node's websocket address, usually "ws://127.0.0.1:8586",
click the Save icon on the right of the text box to save the endpoint.

<img src="../../assets/tutorial/connect-4.png" />
<img src="../assets/tutorial/connect-4.png" />

Finally, click the "Switch" button at the top of this modal:

<img src="../../assets/tutorial/connect-5.png" />
<img src="../assets/tutorial/connect-5.png" />

Congratulations, you've successfully connected to your Gossamer node!

<img src="../../assets/tutorial/connect-6.png" />
<img src="../assets/tutorial/connect-6.png" />
2 changes: 1 addition & 1 deletion lib/grandpa/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type GrandpaMessage interface { //nolint
}

var (
voteType byte = 0
voteType byte
commitType byte = 1
neighbourType byte = 2
catchUpRequestType byte = 3
Expand Down
2 changes: 1 addition & 1 deletion lib/grandpa/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type (
type subround byte

var (
prevote subround = 0
prevote subround
precommit subround = 1
primaryProposal subround = 2
)
Expand Down
4 changes: 2 additions & 2 deletions lib/runtime/extrinsic/unchecked_extrinsic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type testTransCall struct {
var testTransFunc *Function

func TestCreateUncheckedExtrinsic(t *testing.T) {
var nonce uint64 = 0
var nonce uint64
signer := kr.Alice()
genesisHash := common.Hash{}
additional := struct {
Expand All @@ -62,7 +62,7 @@ func TestCreateUncheckedExtrinsicUnsigned(t *testing.T) {
}

func TestUncheckedExtrinsic_Encode(t *testing.T) {
var nonce uint64 = 0
var nonce uint64
signer := kr.Alice()
genesisHash := common.Hash{}
additional := struct {
Expand Down
2 changes: 1 addition & 1 deletion lib/scale/decode_ptr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestDecodePtrBool(t *testing.T) {
}
}

var result bool = true
var result = true
err := DecodePtr([]byte{0xff}, &result)
if err == nil {
t.Error("did not error for invalid bool")
Expand Down
2 changes: 1 addition & 1 deletion lib/trie/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func encodeExtraPartialKeyLength(pkLen int) ([]byte, error) {
}

func decodeKey(r io.Reader, keyLen byte) ([]byte, error) {
var totalKeyLen int = int(keyLen)
var totalKeyLen = int(keyLen)

if keyLen == 0x3f {
// partial key longer than 63, read next bytes for rest of pk len
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fi

if ! command -v golangci-lint &> /dev/null
then
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.39.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.0
fi

export PATH=$PATH:$(go env GOPATH)/bin
22 changes: 11 additions & 11 deletions tests/utils/gossamer_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,26 @@ var (
gossamerCMD = filepath.Join(currentDir, "../..", "bin/gossamer")

// GenesisOneAuth is the genesis file that has 1 authority
GenesisOneAuth string = filepath.Join(currentDir, "../utils/genesis_oneauth.json")
GenesisOneAuth = filepath.Join(currentDir, "../utils/genesis_oneauth.json")
// GenesisThreeAuths is the genesis file that has 3 authorities
GenesisThreeAuths string = filepath.Join(currentDir, "../utils/genesis_threeauths.json")
GenesisThreeAuths = filepath.Join(currentDir, "../utils/genesis_threeauths.json")
// GenesisSixAuths is the genesis file that has 6 authorities
GenesisSixAuths string = filepath.Join(currentDir, "../utils/genesis_sixauths.json")
GenesisSixAuths = filepath.Join(currentDir, "../utils/genesis_sixauths.json")
// GenesisDefault is the default gssmr genesis file
GenesisDefault string = filepath.Join(currentDir, "../..", "chain/gssmr/genesis.json")
GenesisDefault = filepath.Join(currentDir, "../..", "chain/gssmr/genesis.json")
// GenesisDev is the default dev genesis file
GenesisDev string = filepath.Join(currentDir, "../..", "chain/dev/genesis-spec.json")
GenesisDev = filepath.Join(currentDir, "../..", "chain/dev/genesis-spec.json")

// ConfigDefault is the default config file
ConfigDefault string = filepath.Join(currentDir, "../utils/config_default.toml")
ConfigDefault = filepath.Join(currentDir, "../utils/config_default.toml")
// ConfigLogGrandpa is a config file where log levels are set to CRIT except for GRANDPA
ConfigLogGrandpa string = filepath.Join(currentDir, "../utils/config_log_grandpa.toml")
ConfigLogGrandpa = filepath.Join(currentDir, "../utils/config_log_grandpa.toml")
// ConfigNoBABE is a config file with BABE disabled
ConfigNoBABE string = filepath.Join(currentDir, "../utils/config_nobabe.toml")
ConfigNoBABE = filepath.Join(currentDir, "../utils/config_nobabe.toml")
// ConfigNoGrandpa is a config file with grandpa disabled
ConfigNoGrandpa string = filepath.Join(currentDir, "../utils/config_nograndpa.toml")
ConfigNoGrandpa = filepath.Join(currentDir, "../utils/config_nograndpa.toml")
// ConfigNotAuthority is a config file with no authority functionality
ConfigNotAuthority string = filepath.Join(currentDir, "../utils/config_notauthority.toml")
ConfigNotAuthority = filepath.Join(currentDir, "../utils/config_notauthority.toml")
)

// Node represents a gossamer process
Expand Down Expand Up @@ -126,7 +126,7 @@ func InitGossamer(idx int, basePath, genesis, config string) (*Node, error) {
// StartGossamer starts given node
func StartGossamer(t *testing.T, node *Node, websocket bool) error {
var key string
var params []string = []string{"--port", strconv.Itoa(basePort + node.Idx),
var params = []string{"--port", strconv.Itoa(basePort + node.Idx),
"--config", node.config,
"--basepath", node.basePath,
"--rpchost", HOSTNAME,
Expand Down