Skip to content

Commit

Permalink
Merge pull request #1005 from iotaledger/develop
Browse files Browse the repository at this point in the history
Merge v0.4.0 changes to master
  • Loading branch information
capossele authored Feb 26, 2021
2 parents d086365 + 04c9006 commit 8c05675
Show file tree
Hide file tree
Showing 240 changed files with 6,364 additions and 19,057 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Develop
'on':
name: Develop Docker Image

on:
push:
branches:
- develop
paths-ignore:
- 'docs/**'

jobs:

docker:
runs-on: ubuntu-latest
steps:
- name: Checkout

- name: Checkout repository
uses: actions/checkout@v2

- name: Publish to Docker Hub
uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c
with:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/gh-mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: GoShimmer mdBook

on:
push:
branches:
- develop
paths:
- 'docs/**'

jobs:

deploy:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'

- name: Run mdBook
run: mdbook build

- name: Deploy to GitHub Pages
uses: iotaledger/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./book
cname: goshimmer.docs.iota.org
21 changes: 12 additions & 9 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Integration tests

on: pull_request
on:
pull_request:
paths-ignore:
- 'docs/**'

jobs:

Expand All @@ -11,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -46,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -80,7 +83,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -115,7 +118,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -151,7 +154,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -187,7 +190,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -221,7 +224,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down Expand Up @@ -255,7 +258,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Check out code
- name: Checkout repository
uses: actions/checkout@v2

- name: Build GoShimmer image
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: reviewdog
name: Reviewdog

on: pull_request

jobs:

golangci-lint:
name: GolangCI-Lint
name: GolangCI-Lint
runs-on: ubuntu-latest
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run golangci-lint
uses: docker://reviewdog/action-golangci-lint:v1.9
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--timeout=10m"
reporter: "github-pr-review"
- name: Checkout repository
uses: actions/checkout@v2

- name: Run golangci-lint
uses: docker://reviewdog/action-golangci-lint:v1.9
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--timeout=10m"
reporter: "github-pr-review"
24 changes: 15 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Test GoShimmer

on: [push, pull_request]
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'

jobs:

Expand All @@ -9,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.15.5
uses: actions/setup-go@v1
with:
go-version: 1.15.5
- name: Setup Go 1.15.5
uses: actions/setup-go@v1
with:
go-version: 1.15.5

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Run Tests
run: go test ./...
- name: Run Tests
run: go test ./...
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ objectsdb/
shimmer
goshimmer

# Docs
book

config.json
.env
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
# v0.4.0 - 2021-02-26
* Remove the value Tangle
* Add approval switch
* Add Markers integration
* Add new message booker
* Add new ledger state
* Add new opinion former
* Add new Tip manager
* Add new flow unit tests
* Add remote spammer tool
* Add sendTransaction timestamp validity check
* Add clock Since method
* Add docs actions
* Add Tangle width debug tool option
* Update client-lib
* Update wallet
* Update web-API
* Update Grafana dashboard to show MPS for entire data-flow
* Update to latest hive.go
* Refactor integration tests
* Refactor transaction validity check
* Refactor cli-wallet
* Refactor sendTransactionByJson API
* Refactor inclusion state
* Refactor TransactionConfirmed event
* Refactor transaction visualization in the local dashboard
* Refactor scheduler
* Refactor snapshot script
* Fix clock time usage
* Fix wrong handler in the MessageInvalidEvent
* Decrease cache time
* **Breaking**: bumps network and database versions

# v0.3.6 - 2021-02-12
* Finalize Payload layout
* Update dRNG with finalized payload layout
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ COPY config.default.json /config.json
# Copy the Pre-built binary file from the previous stage
COPY --from=build /go/bin/goshimmer /run/goshimmer

ENTRYPOINT ["/run/goshimmer", "--config=/config.json", "--valueLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]
ENTRYPOINT ["/run/goshimmer", "--config=/config.json", "--messageLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]
10 changes: 10 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[book]
authors = ["Dr-Electron"]
language = "en"
multilingual = false
src = "docs"
title = "IOTA GoShimmer"

[output.html]
git-repository-url = "https://github.com/iotaledger/goshimmer"
git-repository-icon = "fa-github"
4 changes: 2 additions & 2 deletions client/spammer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const (
)

// ToggleSpammer toggles the node internal spammer.
func (api *GoShimmerAPI) ToggleSpammer(enable bool) (*webapi_spammer.Response, error) {
func (api *GoShimmerAPI) ToggleSpammer(enable bool, mpm int) (*webapi_spammer.Response, error) {
res := &webapi_spammer.Response{}
if err := api.do(http.MethodGet, func() string {
if enable {
return fmt.Sprintf("%s?cmd=start", routeSpammer)
return fmt.Sprintf("%s?cmd=start&mpm=%d", routeSpammer, mpm)
}
return fmt.Sprintf("%s?cmd=stop", routeSpammer)
}(), nil, res); err != nil {
Expand Down
9 changes: 0 additions & 9 deletions client/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ func (api *GoShimmerAPI) Missing() (*webapi_tools_message.MissingResponse, error

// ------------------- Value layer -----------------------------

// ValueTips returns the value objects info from the tips.
func (api *GoShimmerAPI) ValueTips() (*webapi_tools_value.TipsResponse, error) {
res := &webapi_tools_value.TipsResponse{}
if err := api.do(http.MethodGet, routeValueTips, nil, res); err != nil {
return nil, err
}
return res, nil
}

// ValueObjects returns the list of value objects.
func (api *GoShimmerAPI) ValueObjects() (*webapi_tools_value.ObjectsResponse, error) {
res := &webapi_tools_value.ObjectsResponse{}
Expand Down
12 changes: 7 additions & 5 deletions client/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ func (api *GoShimmerAPI) SendTransaction(txnBytes []byte) (string, error) {
return res.TransactionID, nil
}

// SendTransactionByJSON sends the transaction(JSON) to the Value Tangle and returns transaction ID.
// SendTransactionByJSON sends the transaction(JSON) to the Value Tangle and returns transaction ID and message ID.
func (api *GoShimmerAPI) SendTransactionByJSON(txn webapi_value.SendTransactionByJSONRequest) (string, error) {
res := &webapi_value.SendTransactionByJSONResponse{}
if err := api.do(http.MethodPost, routeSendTxnByJSON,
&webapi_value.SendTransactionByJSONRequest{
Inputs: txn.Inputs,
Outputs: txn.Outputs,
Data: txn.Data,
Signatures: txn.Signatures,
Inputs: txn.Inputs,
Outputs: txn.Outputs,
AManaPledgeID: txn.AManaPledgeID,
CManaPledgeID: txn.CManaPledgeID,
Signatures: txn.Signatures,
Payload: txn.Payload,
}, res); err != nil {
return "", err
}
Expand Down
Loading

0 comments on commit 8c05675

Please sign in to comment.