Skip to content

Commit

Permalink
Merge branch 'develop' into debug/metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Oct 19, 2023
2 parents 503b263 + 4947202 commit 3d04adb
Show file tree
Hide file tree
Showing 24 changed files with 333 additions and 236 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1340,8 +1340,8 @@
{
"current": {
"selected": false,
"text": "faucet:9311",
"value": "faucet:9311"
"text": "validator-3:9311",
"value": "validator-3:9311"
},
"datasource": {
"type": "prometheus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4847,8 +4847,8 @@
{
"current": {
"selected": false,
"text": "faucet:9311",
"value": "faucet:9311"
"text": "validator-3:9311",
"value": "validator-3:9311"
},
"datasource": {
"type": "prometheus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@
{
"current": {
"selected": true,
"text": "peer_master2:9311",
"value": "peer_master2:9311"
"text": "validator-2:9311",
"value": "validator-2:9311"
},
"datasource": {
"type": "prometheus",
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ require (
github.com/google/uuid v1.3.1
github.com/gorilla/websocket v1.5.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/iotaledger/hive.go/ads v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/app v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/constraints v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/crypto v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/ds v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/ierrors v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/kvstore v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/lo v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/logger v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/runtime v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/stringify v0.0.0-20231019082730-54e1c06ab9c2
github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38
github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38
github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad
github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648
Expand Down Expand Up @@ -88,7 +88,7 @@ require (
github.com/huin/goupnp v1.3.0 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect
github.com/iotaledger/hive.go/log v0.0.0-20231019082730-54e1c06ab9c2 // indirect
github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 // indirect
github.com/ipfs/boxo v0.10.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-datastore v0.6.0 // indirect
Expand Down
56 changes: 28 additions & 28 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -277,34 +277,34 @@ github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJ
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
github.com/iotaledger/hive.go/ads v0.0.0-20231019082730-54e1c06ab9c2 h1:asyE+LxMChmcSix5rsms0L23jrlzJt616UoDijPpWTY=
github.com/iotaledger/hive.go/ads v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
github.com/iotaledger/hive.go/app v0.0.0-20231019082730-54e1c06ab9c2 h1:ZjcC0WoYVs64iMFHzodM8qsdncA9O2ItWA3A98JhHMo=
github.com/iotaledger/hive.go/app v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
github.com/iotaledger/hive.go/constraints v0.0.0-20231019082730-54e1c06ab9c2 h1:QPDVoivTVVJIYfXuWW2GpEZLFaJQutkevr2Wm/VKdu4=
github.com/iotaledger/hive.go/constraints v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019082730-54e1c06ab9c2 h1:oVnQnvYgLEzlFxEu4DcHYfGqT5v+8fVQfAGyPMmZL6c=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019082730-54e1c06ab9c2/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
github.com/iotaledger/hive.go/crypto v0.0.0-20231019082730-54e1c06ab9c2 h1:CTbrWBYM98pfpfdYNGfx/a8ub4SXrltjmeGjpB7Jkx4=
github.com/iotaledger/hive.go/crypto v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
github.com/iotaledger/hive.go/ds v0.0.0-20231019082730-54e1c06ab9c2 h1:8i4bvVO+paY/ZxWKr0OHw1xx8Kz9CUIg3+B5gVl7fjk=
github.com/iotaledger/hive.go/ds v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231019082730-54e1c06ab9c2 h1:rpBz3vmvDd2rab6kZE4b4NXkaNSKsJ7v74DLOsbBUlA=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231019082730-54e1c06ab9c2 h1:fgKzJkRaLIGUZpQaB6koK3tYagN2nSaGo1qXmNaKRaA=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
github.com/iotaledger/hive.go/lo v0.0.0-20231019082730-54e1c06ab9c2 h1:BUsL7XFucscD/7jtEpS/EbgFI08PhP4Af3gHNMRqkKA=
github.com/iotaledger/hive.go/lo v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
github.com/iotaledger/hive.go/log v0.0.0-20231019082730-54e1c06ab9c2 h1:Pm1UzKTgobqi1SSX7VG3wMYtahq4vagtOLI/xUypoto=
github.com/iotaledger/hive.go/log v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
github.com/iotaledger/hive.go/logger v0.0.0-20231019082730-54e1c06ab9c2 h1:+LqfdkgC1ahuAhTbXPIyydmni8IsvxNgZziM1cZKfmc=
github.com/iotaledger/hive.go/logger v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
github.com/iotaledger/hive.go/runtime v0.0.0-20231019082730-54e1c06ab9c2 h1:7keivgxNXi2yqt6yx3TWMmZf9vBEaGM4UNpFuaRxg8E=
github.com/iotaledger/hive.go/runtime v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019082730-54e1c06ab9c2 h1:as3d3f7gH2/fR1997OWmRPpKwjY0E1X7Twc4LWBTEuE=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019082730-54e1c06ab9c2/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019082730-54e1c06ab9c2 h1:virnPQxZvZ00VqcZBzTvPo5DLUZgIvH06YEhktwW224=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019082730-54e1c06ab9c2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 h1:/Td52GNRrMzh0lVKwQu/BbVciwrKn5LwtkWAzd41X4Q=
github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38 h1:t60nsq/lI168gM0WqIP44FDHk784uXy35P6uKt9WbMU=
github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 h1:xYh6+dUl+iocWofo0Z/0/OJGSdxYaPV1oYo1HlFj8+s=
github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 h1:3OUYK9wgyH4U6xfGnLdU1QdYQ5dpS/6WRju+eXP051E=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 h1:iXqM0/Y4poiiuNf+0tu3nUj9Dzp4slrWHJ8GXKgt2Zk=
github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 h1:xyaKXgNt8CQ4t14Raqu/4+aBRZQunGOlK+T+99egkSA=
github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38 h1:6I6PEdLuwiIpmiXFVEW5lPaNe+xFdaBR6NSHsNZ3o6c=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 h1:SCBXTAhrLFs0o9EJxO9ZBGPyfq1VhOdb5pP7+vFhdtk=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38 h1:qks472rk/MjwwFvDrlpckxWTf4c1yd+k7ve/IkeuPYk=
github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 h1:6HIBNKOWLXY5Gk1s+q93D6IsTcqwANigfMO3ePtV3HQ=
github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38 h1:lTp8+8GgFH63IMY0G9B90v2vmOlgo+c3XiZg4f0Te+I=
github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38 h1:lPiKbh8o/SN2FGCN9RF7iN1zE+KXCidp815GSOieU8s=
github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 h1:njGr4TrKdpa66XyioxhDU3slV9gZOZeEg7/M8bjXw7M=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 h1:jh0LHzzLqVO+SW9NkvNIgYo1g3CyTBnR8Qv3+PNH+dY=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uTm1Htn2RQOT53RV2zdCIflpuF8N00Tv2FWYimY0=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
Expand Down
16 changes: 16 additions & 0 deletions pkg/protocol/snapshotcreator/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ type Options struct {
// Accounts defines the accounts that are created in the ledger as part of the Genesis.
Accounts []AccountDetails

// BasicOutput defines the basic outputs that are created in the ledger as part of the Genesis.
BasicOutputs []BasicOutputDetails

DataBaseVersion byte
LedgerProvider func() module.Provider[*engine.Engine, ledger.Ledger]
}
Expand Down Expand Up @@ -99,3 +102,16 @@ func WithAccounts(accounts ...AccountDetails) options.Option[Options] {
m.Accounts = accounts
}
}

// BasicOutputDetails is a struct that specifies details of a basic output created in the Genesis snapshot.
type BasicOutputDetails struct {
Address iotago.Address
Amount iotago.BaseToken
Mana iotago.Mana
}

func WithBasicOutputs(basicOutputs ...BasicOutputDetails) options.Option[Options] {
return func(m *Options) {
m.BasicOutputs = basicOutputs
}
}
33 changes: 30 additions & 3 deletions pkg/protocol/snapshotcreator/snapshotcreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ func CreateSnapshot(opts ...options.Option[Options]) error {
return accumulator + details.Amount
}, iotago.BaseToken(0))

totalBasicOutputAmount := lo.Reduce(opt.BasicOutputs, func(accumulator iotago.BaseToken, details BasicOutputDetails) iotago.BaseToken {
return accumulator + details.Amount
}, iotago.BaseToken(0))

var genesisTransactionOutputs iotago.TxEssenceOutputs
genesisOutput, err := createGenesisOutput(api, opt.ProtocolParameters.TokenSupply()-totalAccountAmount, opt.GenesisSeed)
genesisOutput, err := createGenesisOutput(api, opt.ProtocolParameters.TokenSupply()-totalAccountAmount-totalBasicOutputAmount, opt.GenesisSeed)
if err != nil {
return ierrors.Wrap(err, "failed to create genesis outputs")
}
Expand All @@ -133,6 +137,12 @@ func CreateSnapshot(opts ...options.Option[Options]) error {
}
genesisTransactionOutputs = append(genesisTransactionOutputs, accountOutputs...)

genesisBasicOutputs, err := createGenesisBasicOutputs(api, opt.BasicOutputs)
if err != nil {
return ierrors.Wrap(err, "failed to create genesis basic outputs")
}
genesisTransactionOutputs = append(genesisTransactionOutputs, genesisBasicOutputs...)

var accountLedgerOutputs utxoledger.Outputs
for idx, output := range genesisTransactionOutputs {
proof, err := iotago.NewOutputIDProof(engineInstance.LatestAPI(), GenesisTransactionCommitment, GenesisTransactionCreationSlot, genesisTransactionOutputs, uint16(idx))
Expand Down Expand Up @@ -172,7 +182,7 @@ func CreateSnapshot(opts ...options.Option[Options]) error {
func createGenesisOutput(api iotago.API, genesisTokenAmount iotago.BaseToken, genesisSeed []byte) (iotago.Output, error) {
if genesisTokenAmount > 0 {
genesisWallet := mock.NewHDWallet("genesis", genesisSeed, 0)
output := createOutput(genesisWallet.Address(), genesisTokenAmount)
output := createOutput(genesisWallet.Address(), genesisTokenAmount, 0)

if _, err := api.StorageScoreStructure().CoversMinDeposit(output, genesisTokenAmount); err != nil {
return nil, ierrors.Wrap(err, "min rent not covered by Genesis output with index 0")
Expand Down Expand Up @@ -200,9 +210,26 @@ func createGenesisAccounts(api iotago.API, accounts []AccountDetails) (iotago.Tx
return outputs, nil
}

func createOutput(address iotago.Address, tokenAmount iotago.BaseToken) (output iotago.Output) {
func createGenesisBasicOutputs(api iotago.API, basicOutputs []BasicOutputDetails) (iotago.TxEssenceOutputs, error) {
var outputs iotago.TxEssenceOutputs

for idx, genesisBasicOutput := range basicOutputs {
output := createOutput(genesisBasicOutput.Address, genesisBasicOutput.Amount, genesisBasicOutput.Mana)

if _, err := api.StorageScoreStructure().CoversMinDeposit(output, genesisBasicOutput.Amount); err != nil {
return nil, ierrors.Wrapf(err, "min rent not covered by Genesis basic output with index %d", idx)
}

outputs = append(outputs, output)
}

return outputs, nil
}

func createOutput(address iotago.Address, tokenAmount iotago.BaseToken, mana iotago.Mana) (output iotago.Output) {
return &iotago.BasicOutput{
Amount: tokenAmount,
Mana: mana,
Conditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: address},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ func (t *Tracker) ValidatorReward(validatorID iotago.AccountID, stakeAmount iota
return 0, 0, 0, ierrors.Wrapf(err, "failed to calculate profit margin factor due to overflow for epoch %d and validator accountID %s", epoch, validatorID)
}

result, err = safemath.SafeMul(result>>profitMarginExponent, uint64(stakeAmount))
if err != nil {
return 0, 0, 0, ierrors.Wrapf(err, "failed to calculate profit margin factor due to overflow for epoch %d and validator accountID %s", epoch, validatorID)
}

residualValidatorFactor, err := safemath.SafeDiv(result, uint64(rewardsForAccountInEpoch.PoolStake))
residualValidatorFactor, err := safemath.Safe64MulDiv(result>>profitMarginExponent, uint64(stakeAmount), uint64(rewardsForAccountInEpoch.PoolStake))
if err != nil {
return 0, 0, 0, ierrors.Wrapf(err, "failed to calculate residual validator factor due to overflow for epoch %d and validator accountID %s", epoch, validatorID)
}
Expand Down Expand Up @@ -210,6 +205,7 @@ func (t *Tracker) rewardsForAccount(accountID iotago.AccountID, epoch iotago.Epo

return m.Get(accountID)
}

func (t *Tracker) poolReward(slot iotago.SlotIndex, totalValidatorsStake, totalStake, poolStake, validatorStake iotago.BaseToken, performanceFactor uint64) (iotago.Mana, error) {
apiForSlot := t.apiProvider.APIForSlot(slot)
epoch := apiForSlot.TimeProvider().EpochFromSlot(slot)
Expand Down
2 changes: 1 addition & 1 deletion tools/docker-network/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ COMMON_CONFIG="
--protocol.snapshot.path=/app/data/snapshot.bin
"
MANUALPEERING_CONFIG="
--p2p.peers=/dns/peer_master/tcp/14666/p2p/12D3KooWRVt4Engu27jHnF2RjfX48EqiAqJbgLfFdHNt3Vn6BtJK\
--p2p.peers=/dns/validator-1/tcp/14666/p2p/12D3KooWRVt4Engu27jHnF2RjfX48EqiAqJbgLfFdHNt3Vn6BtJK\
"
Loading

0 comments on commit 3d04adb

Please sign in to comment.