Skip to content

Commit

Permalink
Merge pull request #5442 from multiversx/indexer-with-metrics
Browse files Browse the repository at this point in the history
Shard ID in all outport structures
  • Loading branch information
miiu96 authored Aug 10, 2023
2 parents ca787fe + 954c759 commit 46fb465
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 41 deletions.
7 changes: 5 additions & 2 deletions consensus/spos/bls/subroundStartRound.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,11 @@ func (sr *subroundStartRound) indexRoundIfNeeded(pubKeys []string) {
Epoch: epoch,
Timestamp: uint64(sr.RoundTimeStamp.Unix()),
}

sr.outportHandler.SaveRoundsInfo(&outportcore.RoundsInfo{RoundsInfo: []*outportcore.RoundInfo{roundInfo}})
roundsInfo := &outportcore.RoundsInfo{
ShardID: shardId,
RoundsInfo: []*outportcore.RoundInfo{roundInfo},
}
sr.outportHandler.SaveRoundsInfo(roundsInfo)
}

func (sr *subroundStartRound) generateNextConsensusGroup(roundIndex int64) error {
Expand Down
1 change: 1 addition & 0 deletions factory/processing/processComponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,7 @@ func (pcf *processComponentsFactory) indexGenesisBlocks(

arg := &outport.OutportBlockWithHeaderAndBody{
OutportBlock: &outport.OutportBlock{
ShardID: currentShardID,
BlockData: nil, // this will be filled by outport handler
HeaderGasConsumption: &outport.HeaderGasConsumption{
GasProvided: 0,
Expand Down
2 changes: 2 additions & 0 deletions factory/status/statusComponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ func (pc *statusComponents) epochStartEventHandler() epochStart.ActionHandler {
}

pc.outportHandler.SaveValidatorsPubKeys(&outportCore.ValidatorsPubKeys{
ShardID: hdr.GetShardID(),
ShardValidatorsPubKeys: outportCore.ConvertPubKeys(validatorsPubKeys),
Epoch: currentEpoch,
})
Expand Down Expand Up @@ -221,6 +222,7 @@ func (scf *statusComponentsFactory) createOutportDriver() (outport.OutportHandle
}

outportFactoryArgs := &outportDriverFactory.OutportFactoryArgs{
ShardID: scf.shardCoordinator.SelfId(),
RetrialInterval: common.RetrialIntervalForOutportDriver,
ElasticIndexerFactoryArgs: scf.makeElasticIndexerArgs(),
EventNotifierFactoryArgs: eventNotifierArgs,
Expand Down
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ require (
github.com/gorilla/websocket v1.5.0
github.com/mitchellh/mapstructure v1.5.0
github.com/multiversx/mx-chain-communication-go v1.0.4
github.com/multiversx/mx-chain-core-go v1.2.11
github.com/multiversx/mx-chain-core-go v1.2.12
github.com/multiversx/mx-chain-crypto-go v1.2.7
github.com/multiversx/mx-chain-es-indexer-go v1.4.7
github.com/multiversx/mx-chain-es-indexer-go v1.4.8
github.com/multiversx/mx-chain-logger-go v1.0.11
github.com/multiversx/mx-chain-scenario-go v1.1.2
github.com/multiversx/mx-chain-storage-go v1.0.11
Expand All @@ -28,9 +28,9 @@ require (
github.com/pelletier/go-toml v1.9.3
github.com/pkg/errors v0.9.1
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.4
github.com/urfave/cli v1.22.10
golang.org/x/crypto v0.7.0
golang.org/x/crypto v0.9.0
gopkg.in/go-playground/validator.v8 v8.18.2
)

Expand All @@ -42,7 +42,7 @@ require (
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
github.com/bytedance/sonic v1.8.0 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cheekybits/genny v1.0.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
Expand All @@ -58,15 +58,16 @@ require (
github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/uuid v1.3.0 // indirect
Expand All @@ -89,9 +90,9 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/koron/go-ssdp v0.0.3 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
Expand All @@ -114,7 +115,7 @@ require (
github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-pointer v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
Expand Down Expand Up @@ -144,7 +145,7 @@ require (
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
Expand All @@ -164,20 +165,20 @@ require (
github.com/tklauser/go-sysconf v0.3.4 // indirect
github.com/tklauser/numcpus v0.2.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.9 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.22.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
Expand Down
Loading

0 comments on commit 46fb465

Please sign in to comment.