Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IIP-13] implement liquid staking indexer #3853

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
60c5e9a
add system staking indexer interface
envestcc Apr 18, 2023
d8b96d0
add handle event in liquid stake indexer
envestcc Apr 21, 2023
17fc477
use generic func
envestcc Apr 21, 2023
ed2fc4e
refactor
envestcc Apr 21, 2023
0a910a8
refactor
envestcc Apr 21, 2023
120cd8d
add data to dirty write
envestcc Apr 21, 2023
deaf0ae
add index cache
envestcc Apr 24, 2023
b32acfc
add proto
envestcc Apr 24, 2023
1e72ee3
refactor
envestcc Apr 25, 2023
8177ec6
add GetBuckets
envestcc Apr 25, 2023
3772efa
add real abi
envestcc Apr 25, 2023
73dd916
refactor
envestcc Apr 25, 2023
7e531a4
add test
envestcc Apr 26, 2023
c3fe925
use indexed event field
envestcc Apr 26, 2023
0491059
add test
envestcc Apr 27, 2023
2eb8ce1
refactor
envestcc Apr 27, 2023
44a4a22
refactor
envestcc Apr 27, 2023
d4b92cf
refactor
envestcc Apr 27, 2023
3850ccd
remove indexed merge param
envestcc Apr 27, 2023
6438929
add withdraw test
envestcc Apr 28, 2023
7fb8041
fix lint issue
envestcc Apr 28, 2023
883ddb9
refactor
envestcc Apr 28, 2023
901d768
split the big indexer file by struct
envestcc Apr 28, 2023
6c1fb8c
replace key encode/decode func with existed in byteutil
envestcc May 4, 2023
0fe39ad
not use pointer of time.Time
envestcc May 4, 2023
883fc96
fix bugs
envestcc May 4, 2023
65dece3
refactor cache
envestcc May 4, 2023
769c2f8
fix test
envestcc May 4, 2023
c47e20a
Merge branch 'master' into iip13
envestcc May 5, 2023
8172003
add comments
envestcc May 8, 2023
81a7706
use staking.VoteBucket
envestcc May 9, 2023
4611ad7
use candidate owner as identity instead of name
envestcc May 9, 2023
72b736c
add BucketsByIndices & TotalBucketCount
envestcc May 12, 2023
0cb057d
add concurrency safety TODO
envestcc May 13, 2023
084b3c8
use interface to read & write on cache
envestcc May 15, 2023
7d40875
make cache thread-safe
envestcc May 15, 2023
0140551
remove thread-safety todo
envestcc May 15, 2023
41ba506
Merge branch 'master' into iip13
envestcc May 15, 2023
13f59c1
use address instead of candidate name
envestcc May 16, 2023
95dee45
change duration and time to block number
envestcc May 16, 2023
d7c6999
add get bucket types
envestcc May 16, 2023
56f60bc
address comments
envestcc May 17, 2023
2989933
lock during multiple cache read
envestcc May 17, 2023
562976e
Merge branch 'master' into iip13
envestcc May 17, 2023
c369d19
fix test
envestcc May 17, 2023
bd5887c
rename LiquidStakingIndexer to ContractStakingIndexer
envestcc May 18, 2023
60a2037
add contractaddress in bucket
envestcc May 18, 2023
0133dad
add BucketsByCandidate
envestcc May 18, 2023
dc1ee1e
rename liquidstaking to contractstaking
envestcc May 18, 2023
e7d8c7b
use only one mutex
envestcc May 18, 2023
4896243
add test & fix
envestcc May 18, 2023
1cc71b9
add tests
envestcc May 18, 2023
84e8da0
return error when received enexpected event
envestcc May 18, 2023
43867a4
acid for commit
envestcc May 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions action/protocol/execution/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,9 @@ func TestProtocol_Handle(t *testing.T) {
t.Run("CVE-2021-39137-attack-replay", func(t *testing.T) {
NewSmartContractTest(t, "testdata/CVE-2021-39137-attack-replay.json")
})
t.Run("system-staking", func(t *testing.T) {
NewSmartContractTest(t, "testdata/system-staking.json")
})
}

func TestMaxTime(t *testing.T) {
Expand Down
53 changes: 53 additions & 0 deletions action/protocol/execution/testdata/system-staking.json

Large diffs are not rendered by default.

Loading