Skip to content

Commit

Permalink
Merge pull request #1378 from iotaledger/develop
Browse files Browse the repository at this point in the history
Merge v0.6.4 changes to master
  • Loading branch information
capossele authored May 29, 2021
2 parents 768d766 + db11b43 commit 5f8e178
Show file tree
Hide file tree
Showing 151 changed files with 3,423 additions and 968 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# v0.6.4 - 2021-05-29
* Add simple chat dApp
* Improve client lib
* Improve manual peering and add tutorial
* Improve docs and tutorials
* Improve congestion control
* Fix mana dashboard deadlock
* Fix several bugs
* Update snapshot file with Pollen UTXO at 2021-05-29 10:22 UTC
* Update JS dependencies
* Update lo latest hive.go
* **Breaking**: bumps network and database versions

# v0.6.3 - 2021-05-25
* Improve congestion control
* Fix builds
Expand Down
2 changes: 1 addition & 1 deletion client/autopeering.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/drng.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions client/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/iotaledger/hive.go/identity"
"github.com/mr-tron/base58"

"github.com/iotaledger/goshimmer/packages/faucet"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
"github.com/iotaledger/goshimmer/packages/ledgerstate"
"github.com/iotaledger/goshimmer/packages/mana"
"github.com/iotaledger/goshimmer/packages/pow"
"github.com/iotaledger/goshimmer/plugins/faucet"
"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
66 changes: 33 additions & 33 deletions client/ledgerstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"strings"

json_models "github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand All @@ -27,8 +27,8 @@ const (
)

// GetAddressOutputs gets the spent and unspent outputs of an address.
func (api *GoShimmerAPI) GetAddressOutputs(base58EncodedAddress string) (*json_models.GetAddressResponse, error) {
res := &json_models.GetAddressResponse{}
func (api *GoShimmerAPI) GetAddressOutputs(base58EncodedAddress string) (*jsonmodels.GetAddressResponse, error) {
res := &jsonmodels.GetAddressResponse{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetAddresses, base58EncodedAddress}, "")
}(), nil, res); err != nil {
Expand All @@ -38,8 +38,8 @@ func (api *GoShimmerAPI) GetAddressOutputs(base58EncodedAddress string) (*json_m
}

// GetAddressUnspentOutputs gets the unspent outputs of an address.
func (api *GoShimmerAPI) GetAddressUnspentOutputs(base58EncodedAddress string) (*json_models.GetAddressResponse, error) {
res := &json_models.GetAddressResponse{}
func (api *GoShimmerAPI) GetAddressUnspentOutputs(base58EncodedAddress string) (*jsonmodels.GetAddressResponse, error) {
res := &jsonmodels.GetAddressResponse{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetAddresses, base58EncodedAddress, pathUnspentOutputs}, "")
}(), nil, res); err != nil {
Expand All @@ -49,19 +49,19 @@ func (api *GoShimmerAPI) GetAddressUnspentOutputs(base58EncodedAddress string) (
}

// PostAddressUnspentOutputs gets the unspent outputs of several addresses.
func (api *GoShimmerAPI) PostAddressUnspentOutputs(base58EncodedAddresses []string) (*json_models.PostAddressesUnspentOutputsResponse, error) {
res := &json_models.PostAddressesUnspentOutputsResponse{}
func (api *GoShimmerAPI) PostAddressUnspentOutputs(base58EncodedAddresses []string) (*jsonmodels.PostAddressesUnspentOutputsResponse, error) {
res := &jsonmodels.PostAddressesUnspentOutputsResponse{}
if err := api.do(http.MethodPost, func() string {
return strings.Join([]string{routeGetAddresses, "unspentOutputs"}, "")
}(), &json_models.PostAddressesUnspentOutputsRequest{Addresses: base58EncodedAddresses}, res); err != nil {
}(), &jsonmodels.PostAddressesUnspentOutputsRequest{Addresses: base58EncodedAddresses}, res); err != nil {
return nil, err
}
return res, nil
}

// GetBranch gets the branch information.
func (api *GoShimmerAPI) GetBranch(base58EncodedBranchID string) (*json_models.Branch, error) {
res := &json_models.Branch{}
func (api *GoShimmerAPI) GetBranch(base58EncodedBranchID string) (*jsonmodels.Branch, error) {
res := &jsonmodels.Branch{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetBranches, base58EncodedBranchID}, "")
}(), nil, res); err != nil {
Expand All @@ -71,8 +71,8 @@ func (api *GoShimmerAPI) GetBranch(base58EncodedBranchID string) (*json_models.B
}

// GetBranchChildren gets the children of a branch.
func (api *GoShimmerAPI) GetBranchChildren(base58EncodedBranchID string) (*json_models.GetBranchChildrenResponse, error) {
res := &json_models.GetBranchChildrenResponse{}
func (api *GoShimmerAPI) GetBranchChildren(base58EncodedBranchID string) (*jsonmodels.GetBranchChildrenResponse, error) {
res := &jsonmodels.GetBranchChildrenResponse{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetBranches, base58EncodedBranchID, pathChildren}, "")
}(), nil, res); err != nil {
Expand All @@ -82,8 +82,8 @@ func (api *GoShimmerAPI) GetBranchChildren(base58EncodedBranchID string) (*json_
}

// GetBranchConflicts gets the conflict branches of a branch.
func (api *GoShimmerAPI) GetBranchConflicts(base58EncodedBranchID string) (*json_models.GetBranchConflictsResponse, error) {
res := &json_models.GetBranchConflictsResponse{}
func (api *GoShimmerAPI) GetBranchConflicts(base58EncodedBranchID string) (*jsonmodels.GetBranchConflictsResponse, error) {
res := &jsonmodels.GetBranchConflictsResponse{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetBranches, base58EncodedBranchID, pathConflicts}, "")
}(), nil, res); err != nil {
Expand All @@ -93,8 +93,8 @@ func (api *GoShimmerAPI) GetBranchConflicts(base58EncodedBranchID string) (*json
}

// GetOutput gets the output corresponding to OutputID.
func (api *GoShimmerAPI) GetOutput(base58EncodedOutputID string) (*json_models.Output, error) {
res := &json_models.Output{}
func (api *GoShimmerAPI) GetOutput(base58EncodedOutputID string) (*jsonmodels.Output, error) {
res := &jsonmodels.Output{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetOutputs, base58EncodedOutputID}, "")
}(), nil, res); err != nil {
Expand All @@ -104,8 +104,8 @@ func (api *GoShimmerAPI) GetOutput(base58EncodedOutputID string) (*json_models.O
}

// GetOutputConsumers gets the consumers of the output corresponding to OutputID.
func (api *GoShimmerAPI) GetOutputConsumers(base58EncodedOutputID string) (*json_models.GetOutputConsumersResponse, error) {
res := &json_models.GetOutputConsumersResponse{}
func (api *GoShimmerAPI) GetOutputConsumers(base58EncodedOutputID string) (*jsonmodels.GetOutputConsumersResponse, error) {
res := &jsonmodels.GetOutputConsumersResponse{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetOutputs, base58EncodedOutputID, pathConsumers}, "")
}(), nil, res); err != nil {
Expand All @@ -115,8 +115,8 @@ func (api *GoShimmerAPI) GetOutputConsumers(base58EncodedOutputID string) (*json
}

// GetOutputMetadata gets the metadata of the output corresponding to OutputID.
func (api *GoShimmerAPI) GetOutputMetadata(base58EncodedOutputID string) (*json_models.OutputMetadata, error) {
res := &json_models.OutputMetadata{}
func (api *GoShimmerAPI) GetOutputMetadata(base58EncodedOutputID string) (*jsonmodels.OutputMetadata, error) {
res := &jsonmodels.OutputMetadata{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetOutputs, base58EncodedOutputID, pathMetadata}, "")
}(), nil, res); err != nil {
Expand All @@ -126,8 +126,8 @@ func (api *GoShimmerAPI) GetOutputMetadata(base58EncodedOutputID string) (*json_
}

// GetTransaction gets the transaction of the corresponding to TransactionID.
func (api *GoShimmerAPI) GetTransaction(base58EncodedTransactionID string) (*json_models.Transaction, error) {
res := &json_models.Transaction{}
func (api *GoShimmerAPI) GetTransaction(base58EncodedTransactionID string) (*jsonmodels.Transaction, error) {
res := &jsonmodels.Transaction{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetTransactions, base58EncodedTransactionID}, "")
}(), nil, res); err != nil {
Expand All @@ -137,8 +137,8 @@ func (api *GoShimmerAPI) GetTransaction(base58EncodedTransactionID string) (*jso
}

// GetTransactionMetadata gets metadata of the transaction corresponding to TransactionID.
func (api *GoShimmerAPI) GetTransactionMetadata(base58EncodedTransactionID string) (*json_models.TransactionMetadata, error) {
res := &json_models.TransactionMetadata{}
func (api *GoShimmerAPI) GetTransactionMetadata(base58EncodedTransactionID string) (*jsonmodels.TransactionMetadata, error) {
res := &jsonmodels.TransactionMetadata{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetTransactions, base58EncodedTransactionID, pathMetadata}, "")
}(), nil, res); err != nil {
Expand All @@ -148,8 +148,8 @@ func (api *GoShimmerAPI) GetTransactionMetadata(base58EncodedTransactionID strin
}

// GetTransactionInclusionState gets inclusion state of the transaction corresponding to TransactionID.
func (api *GoShimmerAPI) GetTransactionInclusionState(base58EncodedTransactionID string) (*json_models.TransactionInclusionState, error) {
res := &json_models.TransactionInclusionState{}
func (api *GoShimmerAPI) GetTransactionInclusionState(base58EncodedTransactionID string) (*jsonmodels.TransactionInclusionState, error) {
res := &jsonmodels.TransactionInclusionState{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetTransactions, base58EncodedTransactionID, pathInclusionState}, "")
}(), nil, res); err != nil {
Expand All @@ -159,8 +159,8 @@ func (api *GoShimmerAPI) GetTransactionInclusionState(base58EncodedTransactionID
}

// GetTransactionConsensusMetadata gets the consensus metadata of the transaction corresponding to TransactionID.
func (api *GoShimmerAPI) GetTransactionConsensusMetadata(base58EncodedTransactionID string) (*json_models.TransactionConsensusMetadata, error) {
res := &json_models.TransactionConsensusMetadata{}
func (api *GoShimmerAPI) GetTransactionConsensusMetadata(base58EncodedTransactionID string) (*jsonmodels.TransactionConsensusMetadata, error) {
res := &jsonmodels.TransactionConsensusMetadata{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetTransactions, base58EncodedTransactionID, pathConsensus}, "")
}(), nil, res); err != nil {
Expand All @@ -170,8 +170,8 @@ func (api *GoShimmerAPI) GetTransactionConsensusMetadata(base58EncodedTransactio
}

// GetTransactionAttachments gets the attachments (messageIDs) of the transaction corresponding to TransactionID.
func (api *GoShimmerAPI) GetTransactionAttachments(base58EncodedTransactionID string) (*json_models.GetTransactionAttachmentsResponse, error) {
res := &json_models.GetTransactionAttachmentsResponse{}
func (api *GoShimmerAPI) GetTransactionAttachments(base58EncodedTransactionID string) (*jsonmodels.GetTransactionAttachmentsResponse, error) {
res := &jsonmodels.GetTransactionAttachmentsResponse{}
if err := api.do(http.MethodGet, func() string {
return strings.Join([]string{routeGetTransactions, base58EncodedTransactionID, pathAttachments}, "")
}(), nil, res); err != nil {
Expand All @@ -181,10 +181,10 @@ func (api *GoShimmerAPI) GetTransactionAttachments(base58EncodedTransactionID st
}

// PostTransaction sends the transaction(bytes) to the Tangle and returns its transaction ID.
func (api *GoShimmerAPI) PostTransaction(transactionBytes []byte) (*json_models.PostTransactionResponse, error) {
res := &json_models.PostTransactionResponse{}
func (api *GoShimmerAPI) PostTransaction(transactionBytes []byte) (*jsonmodels.PostTransactionResponse, error) {
res := &jsonmodels.PostTransactionResponse{}
if err := api.do(http.MethodPost, routePostTransactions,
&json_models.PostTransactionRequest{TransactionBytes: transactionBytes}, res); err != nil {
&jsonmodels.PostTransactionRequest{TransactionBytes: transactionBytes}, res); err != nil {
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion client/mana.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
25 changes: 14 additions & 11 deletions client/manualpeering.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,41 @@ import (
"net/http"

"github.com/cockroachdb/errors"
"github.com/iotaledger/hive.go/autopeering/peer"
"github.com/iotaledger/hive.go/crypto/ed25519"

"github.com/iotaledger/goshimmer/packages/jsonmodels"
"github.com/iotaledger/goshimmer/packages/manualpeering"
plugin "github.com/iotaledger/goshimmer/plugins/manualpeering"
)

const (
routeManualPeers = "manualpeering/peers"
)

// AddManualPeers adds the provided list of peers to the manual peering layer.
func (api *GoShimmerAPI) AddManualPeers(peers []*peer.Peer) error {
if err := api.do(http.MethodPost, plugin.RouteManualPeers, peers, nil); err != nil {
func (api *GoShimmerAPI) AddManualPeers(peers []*manualpeering.KnownPeerToAdd) error {
if err := api.do(http.MethodPost, routeManualPeers, peers, nil); err != nil {
return errors.Wrap(err, "failed to add manual peers via the HTTP API")
}
return nil
}

// RemoveManualPeers remove the provided list of peers from the manual peering layer.
func (api *GoShimmerAPI) RemoveManualPeers(keys []ed25519.PublicKey) error {
peersToRemove := make([]*plugin.PeerToRemove, len(keys))
peersToRemove := make([]*jsonmodels.PeerToRemove, len(keys))
for i, key := range keys {
peersToRemove[i] = &plugin.PeerToRemove{PublicKey: key.String()}
peersToRemove[i] = &jsonmodels.PeerToRemove{PublicKey: key}
}
if err := api.do(http.MethodDelete, plugin.RouteManualPeers, peersToRemove, nil); err != nil {
if err := api.do(http.MethodDelete, routeManualPeers, peersToRemove, nil); err != nil {
return errors.Wrap(err, "failed to remove manual peers via the HTTP API")
}
return nil
}

// GetManualKnownPeers gets the list of connected neighbors from the manual peering layer.
func (api *GoShimmerAPI) GetManualKnownPeers(opts ...manualpeering.GetKnownPeersOption) (
// GetManualPeers gets the list of connected neighbors from the manual peering layer.
func (api *GoShimmerAPI) GetManualPeers(opts ...manualpeering.GetPeersOption) (
peers []*manualpeering.KnownPeer, err error) {
conf := manualpeering.BuildGetKnownPeersConfig(opts)
if err := api.do(http.MethodGet, plugin.RouteManualPeers, conf, &peers); err != nil {
conf := manualpeering.BuildGetPeersConfig(opts)
if err := api.do(http.MethodGet, routeManualPeers, conf, &peers); err != nil {
return nil, errors.Wrap(err, "failed to get manual connected peers from the API")
}
return peers, nil
Expand Down
2 changes: 1 addition & 1 deletion client/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/spammer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/cockroachdb/errors"

"github.com/iotaledger/goshimmer/plugins/webapi/jsonmodels"
"github.com/iotaledger/goshimmer/packages/jsonmodels"
)

const (
Expand Down
36 changes: 17 additions & 19 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,41 @@ http://goshimmer.docs.iota.org/


- [Tutorials](./tutorials.md)
- [Setting up a GoShimmer node](./tutorials/setup.md)
- [Obtaining tokens from the faucet](./tutorials/request_funds.md)
- [The wallet library](./tutorials/wallet.md)
- [Writing a dApp](./tutorials/dApp.md)
- [How to create a static identity](./tutorials/static_identity.md)
- [How to setup a custom dRNG committee](./tutorials/custom_dRNG.md)
- [Setting up Monitoring Dashboard](./tutorials/monitoring.md)
- [Set up a node](./tutorials/setup.md)
- [Obtain tokens](./tutorials/request_funds.md)
- [Wallet library](./tutorials/wallet.md)
- [Write a dApp](./tutorials/dApp.md)
- [Create a static identity](./tutorials/static_identity.md)
- [Set up a custom dRNG committee](./tutorials/custom_dRNG.md)
- [Set up the Monitoring Dashboard](./tutorials/monitoring.md)


- [Application logic](./application_logic.md)
- [Protocol high level overview](./application_logic/protocol.md)
- [Implementation design](./implementation_design.md)
- [Event driven model](./implementation_design/event_driven_model.md)
- [Packages and plugins](./implementation_design/packages_plugins.md)
- [Plugin](./implementation_design/plugin.md)
- [Configuration parameters](./implementation_design/configuration_parameters.md)
- [Object storage](./implementation_design/object_storage.md)

- [Protocol specification](./protocol_specification.md)
- [Protocol high level overview](./protocol_speficiation/protocol.md)
- [Components](./protocol_specification/components.md)
- [Layers](./protocol_specification/layers.md)
- [Glossary](./protocol_specification/glossary.md)

- [API](./api.md)
- [Client Lib](./apis/api.md)
- [WebAPI](./apis/webAPI.md)
- [Mana](./apis/mana.md)
- [Ledgerstate](./apis/ledgerstate.md)
- [dRNG](./apis/dRNG.md)
- [Communication](./apis/communication.md)
- [Value layer](./apis/value.md)

- [Tooling](./tooling.md)
- [Docker private network](./tooling/docker_private_network.md)
- [Integration tests](./tooling/integration_tests.md)

- [Specification of Implementation](./specification.md)
- [Mana](./specification/001-mana.md)
- [Markers](./specification/003-markers.md)

- [Concepts](./concepts.md)
- [Glossary](./concepts/glossary.md)
- [Layers](./concepts/layers.md)
- [Team Resources](./team_resources.md)
- [How to do a release](teamresources/release.md)
- [How to do a release](./teamresources/release.md)
- [Code Guidelines](./teamresources/guidelines.md)
- [Local development](./teamresources/local_development.md)
- [Modify the Analysis dashboard](../plugins/analysis/dashboard/frontend/README.md)
Expand Down
Loading

0 comments on commit 5f8e178

Please sign in to comment.