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

[Extra/rest] DB, emitter, flusher for tss, bandtss module #464

Merged
merged 291 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
442160a
Merge branch 'tss-offchain' of https://github.com/bandprotocol/privat…
RogerKSI Oct 9, 2023
a492b66
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Oct 9, 2023
f014771
Merge branch 'tss-offchain' into extra/rest-tss
Oct 9, 2023
935a464
Merge branch 'extra/rest-tss' into extra/rest-tss-update
Oct 9, 2023
66c33b2
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 9, 2023
989947a
Merge branch 'tss-offchain' into extra/rest-tss
Oct 9, 2023
98fc04c
Merge branch 'extra/rest-tss' into extra/rest-tss-update
Oct 9, 2023
9785068
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 9, 2023
6d1a4f8
add replacement
Oct 9, 2023
d51a945
Merge branch 'tss-offchain' into extra/rest-tss
Oct 9, 2023
9132d25
Merge branch 'extra/rest-tss' into extra/rest-tss-update
Oct 9, 2023
ff2612f
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 9, 2023
702edbb
merge
Oct 9, 2023
e9ddfe3
Merge branch 'tss-offchain' into extra/rest-tss
Oct 9, 2023
062be61
Merge branch 'extra/rest-tss' into extra/rest-tss-update
Oct 9, 2023
09fcf77
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 9, 2023
8ac38c6
add gid
Oct 9, 2023
10890d9
add pk
Oct 9, 2023
1774ba9
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 9, 2023
dd7976c
add fk
Oct 9, 2023
e58d068
add depguard
Oct 9, 2023
d6129f3
Merge branch 'tss-offchain' of https://github.com/bandprotocol/privat…
RogerKSI Oct 10, 2023
5d1c57d
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Oct 10, 2023
82d8e4c
fix error
RogerKSI Oct 10, 2023
06b007c
Merge branch 'tss-offchain' into extra/rest-tss
Oct 11, 2023
f8582d0
Merge branch 'extra/rest-tss' into extra/rest-tss-update
Oct 11, 2023
775cccf
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 11, 2023
5988e88
Merge branch 'tss-offchain' into extra/rest-tss
Oct 11, 2023
d88d8d9
Merge branch 'extra/rest-tss' into extra/rest-tss-update
Oct 11, 2023
ad07f6f
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
Oct 11, 2023
70d2d57
Merge branch 'tss-offchain' of https://github.com/bandprotocol/privat…
RogerKSI Oct 11, 2023
2b3b64f
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Oct 11, 2023
6943265
Merge branch 'tss-offchain' of https://github.com/bandprotocol/privat…
RogerKSI Oct 21, 2023
3104855
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
RogerKSI Nov 1, 2023
50f829e
Merge branch 'extra/rest-tss' into extra/rest-tss-update
RogerKSI Nov 1, 2023
b95e83b
Merge branch 'extra/rest-tss-update' into extra/rest-tss-full-db
RogerKSI Nov 1, 2023
bb6b81c
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Nov 3, 2023
3456cbb
Merge branch 'extra/rest-tss' into extra/rest-tss-full-db
RogerKSI Nov 3, 2023
297ba51
fix conflict
RogerKSI Dec 21, 2023
c2ef9f5
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Dec 21, 2023
8f0a1e8
update and fix test
RogerKSI Dec 21, 2023
980b376
Merge branch 'extra/rest-tss' into extra/rest-tss-full-db
RogerKSI Jan 11, 2024
f4673c8
fix
RogerKSI Jan 11, 2024
d645cd8
remove unused
RogerKSI Jan 11, 2024
2a3f650
update
RogerKSI Jan 11, 2024
af169b2
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Jan 11, 2024
fb6040e
fix typo
RogerKSI Jan 11, 2024
89a0d17
fix
RogerKSI Jan 12, 2024
9323847
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Jan 12, 2024
4f6eb23
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Jan 12, 2024
e46f99a
fix and refactor
RogerKSI Jan 12, 2024
6881e9b
fix conflict
RogerKSI Feb 8, 2024
34bf21d
fix conflict
RogerKSI Feb 8, 2024
da0f5c3
fix conflict
RogerKSI Feb 11, 2024
2da7bc1
fix conflict
RogerKSI Feb 11, 2024
810a301
fix naming
RogerKSI Feb 11, 2024
145482c
merge branch
RogerKSI Feb 12, 2024
9960e8b
merge master-tss into this branch
nkitlabs Feb 14, 2024
7404a89
fix conflict (#69)
nkitlabs Feb 14, 2024
8a49e00
force push
nkitlabs Feb 14, 2024
875d67a
bump
RogerKSI Feb 15, 2024
42a499c
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Feb 15, 2024
7add8f5
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Feb 18, 2024
7ddb6a5
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Feb 18, 2024
84ff4ab
fix grpc_query test
nkitlabs Apr 23, 2024
5461758
fix hook_test
nkitlabs Apr 23, 2024
630dc4e
fix member_test
nkitlabs Apr 23, 2024
fb82a92
remove groupID from signingRequest
nkitlabs Apr 23, 2024
87c7ab7
fix msg_server_test
nkitlabs Apr 23, 2024
69b373c
fix member_test
nkitlabs Apr 23, 2024
9a2b580
fix update params
nkitlabs Apr 23, 2024
916f42f
fix validator_test
nkitlabs Apr 23, 2024
74ddb34
change payment logic order
nkitlabs Apr 23, 2024
9e6605f
fix replace group test
nkitlabs Apr 23, 2024
ac38039
fix script
nkitlabs Apr 24, 2024
0464fec
use gomock
nkitlabs Apr 25, 2024
db478e9
fix tss test_case
nkitlabs Apr 25, 2024
dfac120
test handleCreateSigning
nkitlabs Apr 25, 2024
0c005d5
fix testcases
nkitlabs Apr 25, 2024
28158d9
rename
nkitlabs Apr 25, 2024
aeb042a
add currentGroup query
nkitlabs Apr 25, 2024
c8ee76f
fix lint
nkitlabs Apr 26, 2024
8a2bdcc
add events
nkitlabs Apr 26, 2024
1d5954d
fix params
nkitlabs Apr 26, 2024
be9738e
remove unused flag
nkitlabs Apr 27, 2024
1498725
remove unused eventtype
nkitlabs Apr 27, 2024
d9412b5
add and fix doc
nkitlabs Apr 27, 2024
a14acd6
Merge branch 'tss-move-replacement-logic' into tss-cleanup-unit-test
RogerKSI Apr 28, 2024
c2c084e
Fix doc
nkitlabs Apr 29, 2024
9e71e5a
rename function
nkitlabs Apr 29, 2024
d2583f1
Merge branch 'tss-move-replacement-logic' into tss-cleanup-unit-test
RogerKSI May 1, 2024
8aa7831
Update proto/bandtss/v1beta1/query.proto
nkitlabs May 2, 2024
2f65311
fix readme
nkitlabs May 2, 2024
4d540d1
merge tss-move-replacement-logic into this branch
nkitlabs May 2, 2024
d157492
fix comments in bandtss module
nkitlabs May 2, 2024
d919d17
fix tss comments
nkitlabs May 2, 2024
8b21fdb
add command is-grantee
nkitlabs May 2, 2024
c68550e
fix group_test
nkitlabs May 2, 2024
c8dde65
fix grpc query members
nkitlabs May 2, 2024
5b42159
test hook signing
nkitlabs May 2, 2024
7b07f9a
add hook createGroup
nkitlabs May 2, 2024
97055b0
fix comments
nkitlabs May 3, 2024
75feb8b
fix lint
nkitlabs May 3, 2024
9cef4b8
merge tss-move-replacement-logic into this branch
nkitlabs May 3, 2024
d2f6a4b
merge master-tss into this branch
nkitlabs May 3, 2024
ef9fa5a
remove package rename
nkitlabs May 6, 2024
82673e2
update and fix conflict
RogerKSI May 7, 2024
927d9f8
fix conflict
RogerKSI May 7, 2024
019ae1a
update
RogerKSI May 7, 2024
5155985
merge master-tss into this branch
nkitlabs May 13, 2024
eff007c
Merge branch 'extra/rest' into extra/rest-tss
nkitlabs May 13, 2024
b12e4f9
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs May 13, 2024
a77b49e
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs May 13, 2024
c0dbf2d
update latest version
May 16, 2024
1407cd7
Merge branch 'master-tss' into extra/rest-tss-full-db
May 16, 2024
886a37b
fix start docker script
May 16, 2024
0263fd2
update table
May 17, 2024
90adbbc
init latest version
May 17, 2024
549e54c
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI May 17, 2024
fbeabea
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI May 17, 2024
39310ba
undo
May 17, 2024
99cb1b3
Merge branch 'extra/rest-tss-full-db' of github.com:bandprotocol/priv…
May 17, 2024
933c422
fix reviews
May 23, 2024
de0c11c
extend timeout
May 23, 2024
1ededfc
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Jun 4, 2024
4eed82e
update
RogerKSI Jun 4, 2024
466a74c
update
RogerKSI Jun 4, 2024
be8730d
fix syntax
RogerKSI Jun 4, 2024
ad2589c
fix typo
RogerKSI Jun 4, 2024
46b0e3e
fix error
RogerKSI Jun 4, 2024
233d0e1
fix config cylinder docker
RogerKSI Jun 4, 2024
7cf241e
fix metadata
RogerKSI Jun 4, 2024
b071fa1
add slep
RogerKSI Jun 4, 2024
72e7cf9
fix
RogerKSI Jun 4, 2024
0ee0808
fix table
RogerKSI Jun 4, 2024
eefa6de
fix table hasura
RogerKSI Jun 4, 2024
2b7ba87
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Jun 5, 2024
cdc4711
conflict
RogerKSI Jun 5, 2024
a810795
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Jun 5, 2024
f5fdef8
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Jun 5, 2024
2575fd3
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Jun 6, 2024
1651e61
fix conflict
RogerKSI Jun 6, 2024
0874daa
remove panic
RogerKSI Jun 9, 2024
a7d4cd3
reject if early
RogerKSI Jun 11, 2024
b1f4015
Merge branch 'master-tss-test-grogu' of https://github.com/bandprotoc…
RogerKSI Jun 11, 2024
c71aa08
remove dup
RogerKSI Jun 23, 2024
467294c
update branch
RogerKSI Jun 23, 2024
572c13b
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Jun 23, 2024
c5b1711
merge
RogerKSI Jun 23, 2024
7159299
update latest bandtss
Jun 24, 2024
e797256
merge extra/rest-feed-flusher into extra/rest-tss
nkitlabs Aug 29, 2024
6f14d9f
merge master-tss into extra/rest-tss
nkitlabs Aug 29, 2024
b84398b
merge master-tss into extra/rest-tss
nkitlabs Aug 29, 2024
f347361
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs Aug 29, 2024
ca8f8e9
fix emitter/flusher tss/bandtss
nkitlabs Aug 30, 2024
0df9b3c
fix logic
nkitlabs Sep 2, 2024
4bb37f5
fix emitter msg decoder
nkitlabs Sep 2, 2024
d610133
Merge branch 'master-tss' into extra/rest-tss
nkitlabs Sep 2, 2024
bb300c3
Merge branch 'extra/rest-tss' into extra/rest-tss-full-db
nkitlabs Sep 2, 2024
62195b8
fix logic transition and bandtss members
nkitlabs Sep 2, 2024
01546e7
format .py files
nkitlabs Sep 2, 2024
39d5b08
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs Sep 2, 2024
692c70f
fix decoder test
nkitlabs Sep 2, 2024
d9e64ca
fix tss signing and bandtss group transition
nkitlabs Sep 3, 2024
cad0b97
merge master-tss into extra/rest-tss
nkitlabs Oct 20, 2024
218de06
merge extra/rest-feed-flusher into extra/rest-tss
nkitlabs Oct 20, 2024
fa736a8
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs Oct 21, 2024
55f6424
fix table schema
nkitlabs Oct 21, 2024
13c0492
Merge branch 'master-tss' into extra/rest-tss
nkitlabs Oct 21, 2024
ce4ee8e
fix mismatch
RogerKSI Oct 21, 2024
4f248a9
Merge branch 'master-tss' into extra/rest-tss
nkitlabs Oct 21, 2024
f6491cf
Merge branch 'extra/rest-tss' into extra/rest-tss-full-db
nkitlabs Oct 21, 2024
1d42e3d
merge master-tss into extra/rest-tss
nkitlabs Oct 31, 2024
2f921fb
merge extra/rest-feed into extra/rest-tss
nkitlabs Oct 31, 2024
081cdb2
Merge branch 'master-tss' into extra/rest-tss
nkitlabs Oct 31, 2024
cad6bf4
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs Oct 31, 2024
eb2b3b0
fix
RogerKSI Oct 31, 2024
0db59e8
fix
RogerKSI Oct 31, 2024
a52bab2
fix
RogerKSI Oct 31, 2024
b5dc0ff
fix order
RogerKSI Oct 31, 2024
4906071
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Oct 31, 2024
2e5febe
update
RogerKSI Oct 31, 2024
4447f94
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Oct 31, 2024
0894446
Merge branch 'extra/rest-feed-flusher' of https://github.com/bandprot…
RogerKSI Oct 31, 2024
408b591
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Oct 31, 2024
8c3f55e
merge master-tss into extra/rest-tss
nkitlabs Nov 7, 2024
a0a89c2
Merge branch 'extra/rest-feed-flusher' into extra/rest-tss
nkitlabs Nov 7, 2024
aa1b94c
merge extra/rest-tss into extra/rest-tss-full-db
nkitlabs Nov 7, 2024
f651808
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Nov 11, 2024
5991c24
patch
RogerKSI Nov 11, 2024
7b3e5c1
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Nov 12, 2024
eb9f397
Merge branch 'extra/rest' of https://github.com/bandprotocol/private-…
RogerKSI Nov 12, 2024
668cddc
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 12, 2024
2ef48c0
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
nkitlabs Nov 12, 2024
8f4df9c
fix from comments
nkitlabs Nov 12, 2024
f24083b
fix test
nkitlabs Nov 12, 2024
0fbc06f
add content type on decoding
RogerKSI Nov 12, 2024
a52b824
fix
RogerKSI Nov 12, 2024
f65021f
retrack table
RogerKSI Nov 12, 2024
142cd7b
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
RogerKSI Nov 12, 2024
bddc6e5
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
RogerKSI Nov 12, 2024
efa0a4f
remove track table first
RogerKSI Nov 12, 2024
fa1256c
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 13, 2024
129f5d4
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 13, 2024
00df794
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
nkitlabs Nov 13, 2024
4d00ca2
fix start_docker script
nkitlabs Nov 13, 2024
b2e0a78
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 13, 2024
1e966a0
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
nkitlabs Nov 13, 2024
118be70
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 13, 2024
1a39ca9
fix from comments
nkitlabs Nov 13, 2024
61ad400
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 13, 2024
d80ae80
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
nkitlabs Nov 13, 2024
700be0d
Merge branch 'master-tss' of https://github.com/bandprotocol/private-…
nkitlabs Nov 13, 2024
d3d02a9
Merge branch 'extra/rest-tss' of https://github.com/bandprotocol/priv…
nkitlabs Nov 13, 2024
dfefc8a
merge extra/rest into extra/rest-tss-full-db
nkitlabs Nov 13, 2024
7d5ba6d
group go mod order
nkitlabs Nov 13, 2024
10c910e
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
RogerKSI Nov 13, 2024
862c451
fix command
RogerKSI Nov 13, 2024
17373e7
fix
RogerKSI Nov 13, 2024
a1abbea
fix
RogerKSI Nov 13, 2024
7d13b95
fix gas
RogerKSI Nov 13, 2024
60356d7
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
RogerKSI Nov 15, 2024
2a8a3a6
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
RogerKSI Nov 15, 2024
f3350ed
fix parameter
RogerKSI Nov 15, 2024
6bccc47
fix from comments
nkitlabs Nov 18, 2024
45e23b4
reformat
nkitlabs Nov 18, 2024
e0a9409
format
nkitlabs Nov 18, 2024
b62d3db
fix conflict
RogerKSI Nov 18, 2024
33fd591
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
nkitlabs Nov 25, 2024
736966d
fix testcase
nkitlabs Nov 25, 2024
58b5fc7
add bandtss.total_fee
nkitlabs Nov 25, 2024
15e78ae
fix lint
RogerKSI Nov 25, 2024
2881164
patch
RogerKSI Nov 25, 2024
89bdc00
Merge branch 'extra/rest-tss-full-db' of https://github.com/bandproto…
nkitlabs Nov 26, 2024
469ff25
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
RogerKSI Nov 26, 2024
bacac4e
add tss content emitter
nkitlabs Nov 26, 2024
b991400
Merge branch 'extra/rest-tss-full-db' of https://github.com/bandproto…
nkitlabs Nov 26, 2024
fa99b5f
fix import order
nkitlabs Nov 26, 2024
582491f
group content into signing table
nkitlabs Nov 27, 2024
d3bf63f
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
nkitlabs Nov 27, 2024
16b66b7
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
nkitlabs Nov 27, 2024
0d96cb9
fix event attribute
nkitlabs Nov 27, 2024
c83777b
fix fields
nkitlabs Nov 28, 2024
eae829d
Merge branch 'extra/rest' of https://github.com/bandprotocol/chain in…
nkitlabs Nov 28, 2024
ab430bb
fix emitting event from bytes to text
nkitlabs Nov 28, 2024
e9ea178
remove register interface
nkitlabs Nov 28, 2024
121d7ca
Fix oracle
nkitlabs Nov 28, 2024
aed4c25
change name to TSS
nkitlabs Nov 28, 2024
4da918e
fix from comments
nkitlabs Nov 28, 2024
376faef
update
RogerKSI Nov 28, 2024
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
2 changes: 2 additions & 0 deletions app/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func NewAppHooks(appCodec codec.Codec,
keepers.OracleKeeper,
keepers.RestakeKeeper,
keepers.FeedsKeeper,
keepers.TSSKeeper,
keepers.BandtssKeeper,
keepers.ICAHostKeeper,
keepers.IBCKeeper.ClientKeeper,
keepers.IBCKeeper.ConnectionKeeper,
Expand Down
43 changes: 43 additions & 0 deletions docker-config/start_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ echo "erase relief tree tobacco around knee concert toast diesel melody rule sig
echo "thought insane behind cool expand clarify strategy occur arrive broccoli middle despair foot cake genuine dawn goose abuse curve identify dinner derive genre effort" \
| bandd keys add account2 --recover --keyring-backend test

echo "drop video mention casual soldier ostrich resemble harvest casual step design gasp grunt lab meadow buzz envelope today spy cliff column habit fall eyebrow" \
| bandd keys add account3 --recover --keyring-backend test

# add accounts to genesis
bandd genesis add-genesis-account validator1 10000000000000uband --keyring-backend test
bandd genesis add-genesis-account validator2 10000000000000uband --keyring-backend test
Expand All @@ -53,6 +56,7 @@ bandd genesis add-genesis-account requester 100000000000000uband --keyring-backe
bandd genesis add-genesis-account relayer 100000000000000uband --keyring-backend test
bandd genesis add-genesis-account account1 100000000000000uband --keyring-backend test
bandd genesis add-genesis-account account2 100000000000000uband --keyring-backend test
bandd genesis add-genesis-account account3 100000000000000uband --keyring-backend test

# create copy of config.toml
cp ~/.band/config/config.toml ~/.band/config/config.toml.temp
Expand Down Expand Up @@ -117,6 +121,7 @@ bandd genesis collect-gentxs
cp ~/.band/config/genesis.json $DIR/genesis.json
cat <<< $(jq '.app_state.gov.params.voting_period = "60s"' $DIR/genesis.json) > $DIR/genesis.json
cat <<< $(jq '.app_state.feeds.params.current_feeds_update_interval = "10"' $DIR/genesis.json) > $DIR/genesis.json
cat <<< $(jq '.app_state.bandtss.params.min_transition_duration = "60s"' $DIR/genesis.json) > $DIR/genesis.json
cat <<< $(jq --arg addr "$(bandd keys show requester -a --keyring-backend test)" '.app_state.feeds.params.admin = $addr' $DIR/genesis.json) > $DIR/genesis.json
cat <<< $(jq '.app_state.restake.params.allowed_denoms = ["uband"]' $DIR/genesis.json) > $DIR/genesis.json

Expand Down Expand Up @@ -162,6 +167,44 @@ do
docker start bandchain-yoda${v}
done

sleep 10

for v in {1..3}
do
rm -rf ~/.cylinder
cylinder config node tcp://multi-validator$v-node:26657
cylinder config chain-id bandchain
cylinder config granter $(bandd keys show account$v -a --keyring-backend test)
cylinder config max-messages 20
cylinder config broadcast-timeout "5m"
cylinder config rpc-poll-interval "1s"
cylinder config max-try 5
cylinder config gas-prices "0uband"
cylinder config min-de 100
cylinder config gas-adjust-start 1.6
cylinder config gas-adjust-step 0.2
cylinder config random-secret "$(openssl rand -hex 32)"
cylinder config checking-de-interval "1m"

for i in $(eval echo {1..4})
do
# add signer key
cylinder keys add signer$i
done

# send band tokens to grantees
echo "y" | bandd tx bank multi-send account$v $(cylinder keys list -a) 1000000uband --keyring-backend test --chain-id bandchain --gas-prices 0.0025uband -b sync
sleep 4

# grant tss
echo "y" | bandd tx tss add-grantees $(cylinder keys list -a) --from account$v --keyring-backend test --chain-id bandchain --gas-prices 0.0025uband --gas 700000 -b sync
sleep 4

docker create --network chain_bandchain --name bandchain-cylinder${v} band-validator:latest cylinder run
docker cp ~/.cylinder bandchain-cylinder${v}:/root/.cylinder
docker start bandchain-cylinder${v}
done

# pull latest image first
docker pull bandprotocol/bothan-api:latest

Expand Down
118 changes: 118 additions & 0 deletions flusher/flusher/bandtss_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import enum

import sqlalchemy as sa

from .db import Column, CustomBase64, CustomDateTime, metadata


class GroupTransitionStatus(enum.Enum):
nil = 0
creating_group = 1
waiting_sign = 2
waiting_execution = 3
success = 4
expired = 5


class CustomGroupTransitionStatus(sa.types.TypeDecorator):
impl = sa.Enum(GroupTransitionStatus)

def process_bind_param(self, value, dialect):
return GroupTransitionStatus(value)


bandtss_group_transitions = sa.Table(
"bandtss_group_transitions",
metadata,
Column("proposal_id", sa.Integer, sa.ForeignKey("proposals.id"), primary_key=True),
Column(
"tss_signing_id", sa.Integer, sa.ForeignKey("tss_signings.id"), nullable=True
),
Column(
"current_tss_group_id",
sa.Integer,
sa.ForeignKey("tss_groups.id"),
nullable=True,
),
Column(
"incoming_tss_group_id",
sa.Integer,
sa.ForeignKey("tss_groups.id"),
nullable=True,
),
Column("current_group_pub_key", CustomBase64, nullable=True),
Column("incoming_group_pub_key", CustomBase64, nullable=True),
Column("status", CustomGroupTransitionStatus),
Column("exec_time", CustomDateTime),
Column("is_force_transition", sa.Boolean),
Column(
"created_height",
sa.Integer,
sa.ForeignKey("blocks.height"),
nullable=True,
index=True,
),
sa.Index(
"ix_tss_signing_id_current_tss_group_id_incoming_tss_group_id",
"tss_signing_id",
"current_tss_group_id",
"incoming_tss_group_id",
nkitlabs marked this conversation as resolved.
Show resolved Hide resolved
),
)

bandtss_current_groups = sa.Table(
RogerKSI marked this conversation as resolved.
Show resolved Hide resolved
"bandtss_current_groups",
metadata,
Column(
"proposal_id",
sa.Integer,
sa.ForeignKey("proposals.id"),
nullable=True,
index=True,
),
Column(
"current_tss_group_id",
sa.Integer,
sa.ForeignKey("tss_groups.id"),
primary_key=True,
),
Column(
"transition_height",
sa.Integer,
sa.ForeignKey("blocks.height"),
index=True,
primary_key=True,
),
)

bandtss_members = sa.Table(
"bandtss_members",
metadata,
Column(
"tss_group_id", sa.Integer, sa.ForeignKey("tss_groups.id"), primary_key=True
),
Column("account_id", sa.Integer, sa.ForeignKey("accounts.id"), primary_key=True),
Column("is_active", sa.Boolean),
Column("since", CustomDateTime, nullable=True),
)

bandtss_signings = sa.Table(
"bandtss_signings",
metadata,
Column("id", sa.Integer, primary_key=True),
Column("account_id", sa.Integer, sa.ForeignKey("accounts.id")),
Column("fee_per_signer", sa.String),
Column("total_fee", sa.String),
Column(
"current_group_tss_signing_id",
sa.Integer,
sa.ForeignKey("tss_signings.id"),
nullable=True,
),
Column(
"incoming_group_tss_signing_id",
sa.Integer,
sa.ForeignKey("tss_signings.id"),
nullable=True,
),
)
24 changes: 12 additions & 12 deletions flusher/flusher/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,32 @@ class ProposalStatus(enum.Enum):
Inactive = 6


class VoteOption(enum.Enum):
Empty = 0
Yes = 1
Abstain = 2
No = 3
NoWithVeto = 4
class TSSEncoder(enum.Enum):
Unspecified = 0
Proto = 1
FullABI = 2
PartialABI = 3


class CustomResolveStatus(sa.types.TypeDecorator):

impl = sa.Enum(ResolveStatus)

def process_bind_param(self, value, dialect):
return ResolveStatus(value)


class CustomProposalStatus(sa.types.TypeDecorator):

impl = sa.Enum(ProposalStatus)

def process_bind_param(self, value, dialect):
return ProposalStatus(value)


class CustomVoteOption(sa.types.TypeDecorator):

impl = sa.Enum(VoteOption)
class CustomTSSEncoder(sa.types.TypeDecorator):
impl = sa.Enum(TSSEncoder)

def process_bind_param(self, value, dialect):
return VoteOption(value)
return TSSEncoder(value)


class CustomDateTime(sa.types.TypeDecorator):
Expand Down Expand Up @@ -193,6 +189,7 @@ def Column(*args, **kwargs):
Column("prepare_gas_used", sa.Integer, default=0),
Column("execute_gas", sa.Integer),
Column("execute_gas_used", sa.Integer, default=0),
Column("tss_encoder", CustomTSSEncoder),
Column("sender", sa.String, nullable=True),
Column("client_id", sa.String),
Column("request_time", sa.Integer, nullable=True, index=True),
Expand All @@ -201,6 +198,9 @@ def Column(*args, **kwargs):
Column("resolve_height", sa.Integer, sa.ForeignKey("blocks.height"), nullable=True, index=True),
Column("reason", sa.String, nullable=True),
Column("result", CustomBase64, nullable=True),
Column("bandtss_signing_id", sa.Integer, sa.ForeignKey("bandtss_signings.id"), nullable=True),
Column("bandtss_signing_error_codespace", sa.String, nullable=True),
Column("bandtss_signing_error_code", sa.Integer, nullable=True),
Column("total_fees", sa.String),
Column("is_ibc", sa.Boolean),
sa.Index(
Expand Down
Loading
Loading