Skip to content

Commit af7437a

Browse files
authored
Merge pull request #2348 from iotaledger/develop
2 parents e8d192b + aeabb25 commit af7437a

Some content is hidden

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

70 files changed

+1496
-1026
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# v0.9.3 - 2022-07-19
2+
3+
> This release introduces bugfixes and improvements found in the previous release.
4+
5+
The snapshot has been changed and thus the ledger state is fully reset.
6+
7+
- Fix remote log collection (#2343)
8+
- Fix marker walk during tip fishing (#2346)
9+
- Fix: P2P protocol initialization (#2340)
10+
- Update default TSC threshold (#2342)
11+
- Improve tangle time used to calculate active cMana nodes. (#2338)
12+
- Fix: do not trigger BlockRateLimiter if not bootstrapped (#2341)
13+
- Notarization: do not care if attachment is booked when dealing with conflict events (#2336)
14+
- Introduce by epoch index localized BlockID (#2331)
15+
- Update docker-compose params (#2335)
16+
- Support additional protocols on top of P2P connection (#2330)
17+
118
# v0.9.2 - 2022-07-14
219

320
> This release introduces the epoch commitments feature which allows creating proofs-of-inclusion of a block in the tangle. This feature is also the first step to the development of pruning, local snapshots and will allow more efficient way of syncing a node. This release also improves the parameters of rate-setter that should improve user-experience of issuing new blocks. It also contains various bugfixes and improvements, change of terminology e.g. message -> block etc. as well as replacement of grades of finality with confirmation state.

config.default.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"directory": "mainnetdb",
3333
"inMemory": false
3434
},
35-
"gossip": {
35+
"p2p": {
3636
"bindAddress": "0.0.0.0:14666"
3737
},
3838
"logger": {
@@ -93,8 +93,5 @@
9393
},
9494
"networkdelay": {
9595
"originPublicKey": "9DB3j9cWYSuEEtkvanrzqkzCQMdH1FGv3TawJdVbDxkd"
96-
},
97-
"manaInitializer": {
98-
"FaucetAPI": "faucet-01.devnet.shimmer.iota.cafe:8080"
9996
}
10097
}

deploy/ansible/roles/goshimmer-node/templates/docker-compose-goshimmer.yml.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ services:
4141
- ANALYSIS_CLIENT_SERVERADDRESS={{ analysisServerHost }}:21888
4242
- AUTOPEERING_BINDADDRESS=0.0.0.0:14626
4343
- DASHBOARD_BINDADDRESS=0.0.0.0:8081
44-
- GOSSIP_BINDADDRESS=0.0.0.0:14666
44+
- P2P_BINDADDRESS=0.0.0.0:14666
4545
- WEBAPI_BINDADDRESS=0.0.0.0:8080
4646
- PROFILING_BINDADDRESS=0.0.0.0:6061
4747
command: >

deploy/ansible/roles/goshimmer-node/templates/docker-compose-public-node.yml.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services:
3030
- ANALYSIS_CLIENT_SERVERADDRESS={{ analysisServerHost }}:21888
3131
- AUTOPEERING_BINDADDRESS=0.0.0.0:14626
3232
- DASHBOARD_BINDADDRESS=0.0.0.0:8081
33-
- GOSSIP_BINDADDRESS=0.0.0.0:14666
33+
- P2P_BINDADDRESS=0.0.0.0:14666
3434
- WEBAPI_BINDADDRESS=0.0.0.0:8080
3535
- PROFILING_BINDADDRESS=0.0.0.0:6061
3636
command: >

deploy/ansible/roles/metrics/templates/logstash/pipeline/logstash.conf.j2

+11-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ filter {
1515
}
1616

1717
json {
18-
source => "block"
18+
source => "message"
1919
target => "log"
20-
remove_field => ["block"]
20+
remove_field => ["message"]
2121
}
2222
}
2323

@@ -113,6 +113,15 @@ output {
113113
ilm_pattern => "000001"
114114
ilm_policy => "logstash-policy"
115115
}
116+
} else if [log][type] == "log" {
117+
elasticsearch {
118+
hosts => "elasticsearch:9200"
119+
user => "{{ elkElasticUser }}"
120+
password => "{{ elkElasticPassword }}"
121+
ilm_rollover_alias => "logs"
122+
ilm_pattern => "000001"
123+
ilm_policy => "logstash-policy"
124+
}
116125
} else{
117126
elasticsearch {
118127
hosts => "elasticsearch:9200"

docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
- ANALYSIS_CLIENT_SERVERADDRESS=analysisentry-01.devnet.shimmer.iota.cafe:21888
3434
- AUTOPEERING_BINDADDRESS=0.0.0.0:14626
3535
- DASHBOARD_BINDADDRESS=0.0.0.0:8081
36-
- GOSSIP_BINDADDRESS=0.0.0.0:14666
36+
- P2P_BINDADDRESS=0.0.0.0:14666
3737
- WEBAPI_BINDADDRESS=0.0.0.0:8080
3838
- PROFILING_BINDADDRESS=0.0.0.0:6061
3939
- NETWORKDELAY_ORIGINPUBLICKEY=9DB3j9cWYSuEEtkvanrzqkzCQMdH1FGv3TawJdVbDxkd
@@ -45,7 +45,6 @@ services:
4545
--node.enablePlugins=remotelog,networkdelay,spammer,prometheus
4646
--database.directory=/app/mainnetdb
4747
--node.peerDBDirectory=/app/peerdb
48-
--manaInitializer.FaucetAPI=faucet-01.devnet.shimmer.iota.cafe:8080
4948
--logger.level=info
5049
--logger.disableEvents=false
5150
--logger.remotelog.serverAddress=metrics-01.devnet.shimmer.iota.cafe:5213

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/gin-gonic/gin v1.7.0
1313
github.com/go-resty/resty/v2 v2.6.0
1414
github.com/gorilla/websocket v1.5.0
15-
github.com/iotaledger/hive.go v0.0.0-20220714071841-4f9c6ffe833a
15+
github.com/iotaledger/hive.go v0.0.0-20220714132400-7fd91bb37663
1616
github.com/labstack/echo v3.3.10+incompatible
1717
github.com/labstack/gommon v0.3.0
1818
github.com/libp2p/go-libp2p v0.15.0

go.sum

+2-8
Original file line numberDiff line numberDiff line change
@@ -475,14 +475,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
475475
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
476476
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
477477
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
478-
github.com/iotaledger/hive.go v0.0.0-20220705110659-84be3e28c8ce h1:r6nyywvjxrFwC6qE9NcU/cWaLL8XWyzPtvQ0UfYGGmE=
479-
github.com/iotaledger/hive.go v0.0.0-20220705110659-84be3e28c8ce/go.mod h1:8f9U7qHFby0W3cxv/nKnz9LHn9BbwWU0tMsWDnfqzRI=
480-
github.com/iotaledger/hive.go v0.0.0-20220713131416-10a47a2d9944 h1:ARmT1GEX1XxOah061u7AXsnegFqYsRu/rge5fuBINts=
481-
github.com/iotaledger/hive.go v0.0.0-20220713131416-10a47a2d9944/go.mod h1:8f9U7qHFby0W3cxv/nKnz9LHn9BbwWU0tMsWDnfqzRI=
482-
github.com/iotaledger/hive.go v0.0.0-20220714061633-953e10f60c45 h1:tKgADjyZLNzcI5/pd/oW3rhcvGPq9yYODjqwrltqw2M=
483-
github.com/iotaledger/hive.go v0.0.0-20220714061633-953e10f60c45/go.mod h1:8f9U7qHFby0W3cxv/nKnz9LHn9BbwWU0tMsWDnfqzRI=
484-
github.com/iotaledger/hive.go v0.0.0-20220714071841-4f9c6ffe833a h1:052kOYS5MjFWQrbS3mRzWERRrxAgXaZQBjDQRsWxWNU=
485-
github.com/iotaledger/hive.go v0.0.0-20220714071841-4f9c6ffe833a/go.mod h1:8f9U7qHFby0W3cxv/nKnz9LHn9BbwWU0tMsWDnfqzRI=
478+
github.com/iotaledger/hive.go v0.0.0-20220714132400-7fd91bb37663 h1:9Iyp28UlCFLJ4inXjU7zx5WwpgvsJx8WoFiwP+SmoFQ=
479+
github.com/iotaledger/hive.go v0.0.0-20220714132400-7fd91bb37663/go.mod h1:8f9U7qHFby0W3cxv/nKnz9LHn9BbwWU0tMsWDnfqzRI=
486480
github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
487481
github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
488482
github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=

packages/epoch/types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import (
55
"fmt"
66
"time"
77

8-
"github.com/iotaledger/goshimmer/packages/clock"
98
"github.com/iotaledger/hive.go/generics/model"
109
"github.com/iotaledger/hive.go/serix"
1110
"github.com/mr-tron/base58"
1211
"golang.org/x/crypto/blake2b"
12+
13+
"github.com/iotaledger/goshimmer/packages/clock"
1314
)
1415

1516
var (

packages/firewall/firewall.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ import (
77
"github.com/iotaledger/hive.go/identity"
88
"github.com/iotaledger/hive.go/logger"
99

10-
"github.com/iotaledger/goshimmer/packages/gossip"
10+
"github.com/iotaledger/goshimmer/packages/p2p"
1111
)
1212

1313
// Firewall is a object responsible for taking actions on faulty peers.
1414
type Firewall struct {
15-
gossipMgr *gossip.Manager
15+
p2pManager *p2p.Manager
1616
autopeering *selection.Protocol
1717
log *logger.Logger
1818
peersFaultinessCountMutex sync.RWMutex
1919
peersFaultinessCount map[identity.ID]int
2020
}
2121

2222
// NewFirewall create a new instance of Firewall object.
23-
func NewFirewall(gossipMgr *gossip.Manager, autopeering *selection.Protocol, log *logger.Logger) (*Firewall, error) {
23+
func NewFirewall(p2pManager *p2p.Manager, autopeering *selection.Protocol, log *logger.Logger) (*Firewall, error) {
2424
return &Firewall{
25-
gossipMgr: gossipMgr,
25+
p2pManager: p2pManager,
2626
autopeering: autopeering,
2727
log: log,
2828
peersFaultinessCount: map[identity.ID]int{},
@@ -48,20 +48,20 @@ func (f *Firewall) HandleFaultyPeer(peerID identity.ID, details *FaultinessDetai
4848
logKVList := append([]interface{}{"peerId", peerID}, details.toKVList()...)
4949
f.log.Infow("Peer is faulty, executing firewall logic to handle the peer", logKVList...)
5050
f.incrPeerFaultinessCount(peerID)
51-
nbr, err := f.gossipMgr.GetNeighbor(peerID)
51+
nbr, err := f.p2pManager.GetNeighbor(peerID)
5252
if err != nil {
5353
f.log.Errorw("Can't get neighbor info from the gossip manager", "peerId", peerID, "err", err)
5454
return
5555
}
56-
if nbr.Group == gossip.NeighborsGroupAuto {
56+
if nbr.Group == p2p.NeighborsGroupAuto {
5757
if f.autopeering != nil {
5858
f.log.Infow(
5959
"Blocklisting peer in the autopeering selection",
6060
"peerId", peerID,
6161
)
6262
f.autopeering.BlockNeighbor(peerID)
6363
}
64-
} else if nbr.Group == gossip.NeighborsGroupManual {
64+
} else if nbr.Group == p2p.NeighborsGroupManual {
6565
f.log.Warnw("To the node operator. One of neighbors connected via manual peering acts faulty, no automatic actions taken. Consider removing it from the known peers list.",
6666
logKVList...)
6767
}

packages/gossip/common.go

-18
This file was deleted.

packages/gossip/errors.go

-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,4 @@ import "github.com/cockroachdb/errors"
55
var (
66
// ErrNotRunning is returned when a neighbor is added to a stopped or not yet started gossip manager.
77
ErrNotRunning = errors.New("manager not running")
8-
// ErrUnknownNeighbor is returned when the specified neighbor is not known to the gossip manager.
9-
ErrUnknownNeighbor = errors.New("unknown neighbor")
10-
// ErrLoopbackNeighbor is returned when the own peer is specified as a neighbor.
11-
ErrLoopbackNeighbor = errors.New("loopback connection not allowed")
12-
// ErrDuplicateNeighbor is returned when the same peer is added more than once as a neighbor.
13-
ErrDuplicateNeighbor = errors.New("already connected")
14-
// ErrNeighborQueueFull is returned when the send queue is already full.
15-
ErrNeighborQueueFull = errors.New("send queue is full")
168
)

packages/gossip/events.go

+4-57
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package gossip
22

33
import (
4-
pb "github.com/iotaledger/goshimmer/packages/gossip/gossipproto"
54
"github.com/iotaledger/hive.go/autopeering/peer"
65
"github.com/iotaledger/hive.go/generics/event"
76
)
@@ -12,13 +11,6 @@ type Events struct {
1211
BlockReceived *event.Event[*BlockReceivedEvent]
1312
}
1413

15-
// newEvents returns a new Events object.
16-
func newEvents() (new *Events) {
17-
return &Events{
18-
BlockReceived: event.New[*BlockReceivedEvent](),
19-
}
20-
}
21-
2214
// BlockReceivedEvent holds data about a block received event.
2315
type BlockReceivedEvent struct {
2416
// The raw block.
@@ -27,54 +19,9 @@ type BlockReceivedEvent struct {
2719
Peer *peer.Peer
2820
}
2921

30-
// NeighborsEvents is a collection of events specific for a particular neighbors group, e.g "manual" or "auto".
31-
type NeighborsEvents struct {
32-
// Fired when a neighbor connection has been established.
33-
NeighborAdded *event.Event[*NeighborAddedEvent]
34-
35-
// Fired when a neighbor has been removed.
36-
NeighborRemoved *event.Event[*NeighborRemovedEvent]
37-
}
38-
39-
// NewNeighborsEvents returns a new instance of NeighborsEvents.
40-
func NewNeighborsEvents() (new *NeighborsEvents) {
41-
return &NeighborsEvents{
42-
NeighborAdded: event.New[*NeighborAddedEvent](),
43-
NeighborRemoved: event.New[*NeighborRemovedEvent](),
44-
}
45-
}
46-
47-
// NeighborAddedEvent holds data about the added neighbor.
48-
type NeighborAddedEvent struct {
49-
Neighbor *Neighbor
50-
}
51-
52-
// NeighborAddedEvent holds data about the removed neighbor.
53-
type NeighborRemovedEvent struct {
54-
Neighbor *Neighbor
55-
}
56-
57-
// NeighborEvents is a collection of events specific to a neighbor.
58-
type NeighborEvents struct {
59-
// Fired when a neighbor disconnects.
60-
Disconnected *event.Event[*NeighborDisconnectedEvent]
61-
62-
// Fired when a packet is received from a neighbor.
63-
PacketReceived *event.Event[*NeighborPacketReceivedEvent]
64-
}
65-
66-
// NewNeighborsEvents returns a new instance of NeighborsEvents.
67-
func NewNeighborEvents() (new *NeighborEvents) {
68-
return &NeighborEvents{
69-
Disconnected: event.New[*NeighborDisconnectedEvent](),
70-
PacketReceived: event.New[*NeighborPacketReceivedEvent](),
22+
// newEvents returns a new Events object.
23+
func newEvents() (new *Events) {
24+
return &Events{
25+
BlockReceived: event.New[*BlockReceivedEvent](),
7126
}
7227
}
73-
74-
// NeighborDisconnectedEvent holds data about the disconnected neighbor.
75-
type NeighborDisconnectedEvent struct{}
76-
77-
// NeighborDisconnectedEvent holds data about the disconnected neighbor.
78-
type NeighborPacketReceivedEvent struct {
79-
Packet *pb.Packet
80-
}

0 commit comments

Comments
 (0)