Skip to content

Commit

Permalink
Balance tminus1 recalculations optimization. (#63)
Browse files Browse the repository at this point in the history
Decreased clickhouse requests. Fixed timeout issues. Added flag to
remove debug information.
  • Loading branch information
ice-myles authored Dec 18, 2023
1 parent 4f520ba commit 957efd1
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 117 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/goccy/go-json v0.10.2
github.com/hashicorp/go-multierror v1.1.1
github.com/ice-blockchain/eskimo v1.225.0
github.com/ice-blockchain/eskimo v1.226.0
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb
github.com/ice-blockchain/wintr v1.127.0
github.com/imroc/req/v3 v3.42.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/ice-blockchain/eskimo v1.225.0 h1:aA+PL0vXbD52dRc9QZMZoNDkMyVd0r8qAwUQNMjrmno=
github.com/ice-blockchain/eskimo v1.225.0/go.mod h1:Du7qkQbFadYFb9YddPfGrErk0tX3zEX7ckIzxBZXwQY=
github.com/ice-blockchain/eskimo v1.226.0 h1:mZw2efPMUUQVGw3Eh43G/XDE5JTmaX/50gZzaRv9cBk=
github.com/ice-blockchain/eskimo v1.226.0/go.mod h1:Btj5U8KPf2+dkGtajQER1SjfXv40t8RqaihVNd4FE1s=
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb h1:8TnFP3mc7O+tc44kv2e0/TpZKnEVUaKH+UstwfBwRkk=
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb/go.mod h1:ZsQU7i3mxhgBBu43Oev7WPFbIjP4TniN/b1UPNGbrq8=
github.com/ice-blockchain/wintr v1.127.0 h1:YuGfLCGu91mLtsH0AcdNKnDERZPD6+3er93T/m7vF2Q=
Expand Down
9 changes: 8 additions & 1 deletion miner/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const (

balanceT2BugfixDryRunEnabled = false
balanceT2BugfixEnabled = false

clearBugfixDebugInfoEnabled = false
)

// .
Expand Down Expand Up @@ -139,7 +141,6 @@ type (

recalculated struct {
model.RecalculatedBalanceForTMinus1AtField
model.RecalculatedBalanceT2AtField
model.DeserializedRecalculatedUsersKey
}

Expand All @@ -153,6 +154,12 @@ type (
ID, IDT0, IDTMinus1 int64
}

dryrunUser struct {
model.DeserializedDryRunUsersKey
model.IDTMinus1Field
model.RecalculatedBalanceForTMinus1AtField
}

miner struct {
mb messagebroker.Client
db storage.DB
Expand Down
Loading

0 comments on commit 957efd1

Please sign in to comment.