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

refactor: inbound and outbound vote processing #1853

Merged
merged 44 commits into from
Apr 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
466b3b8
refactor inbound vote
kingpinXD Mar 5, 2024
46366f8
add unit tests for ProcessZEVMDeposit
kingpinXD Mar 6, 2024
398ee79
creating mocking functions for test refactor
kingpinXD Mar 6, 2024
595fd36
add tests for Process message passing
kingpinXD Mar 6, 2024
842fcb1
move cointype to cctx struct and refactor tests to accomodate the change
kingpinXD Mar 6, 2024
822d4d4
add defer to recover from panic if config is already set
kingpinXD Mar 6, 2024
b228a28
add more unit tests
kingpinXD Mar 7, 2024
f285fe4
add validate
kingpinXD Mar 7, 2024
806a6f5
add validate function for cctx
kingpinXD Mar 8, 2024
d816489
add validate function for cctx
kingpinXD Mar 8, 2024
be6dc4e
add validate unit tests
kingpinXD Mar 8, 2024
639f2a4
add migration test
kingpinXD Mar 9, 2024
1c1fea6
set module version
kingpinXD Mar 9, 2024
4cdfaf8
fix unit tests
kingpinXD Mar 9, 2024
8d17e2d
remove unnecessary test
kingpinXD Mar 9, 2024
eb51c89
update upgrade docker file
kingpinXD Mar 11, 2024
ce158e1
rebase develop
kingpinXD Mar 11, 2024
77ae684
generate files
kingpinXD Mar 11, 2024
550f454
Merge branch 'develop' into refactor-inbound-vote
kingpinXD Mar 12, 2024
ea1812e
modify logs
kingpinXD Mar 12, 2024
4080792
ignore address validation for zetachain
kingpinXD Mar 12, 2024
5f4f37b
ignore address validation for zetachain
kingpinXD Mar 13, 2024
117fe62
ignore tx hash check
kingpinXD Mar 13, 2024
f59f1a6
Merge branch 'develop' into refactor-inbound-vote
kingpinXD Mar 18, 2024
152a3de
refactor: outboud vote (#1886)
kingpinXD Mar 18, 2024
69e3f33
remove changes to cctx struct
kingpinXD Mar 18, 2024
267dbce
modify changelog
kingpinXD Mar 18, 2024
8e35f5b
Merge branch 'develop' into refactor-inbound-vote
kingpinXD Mar 19, 2024
34da80f
add tests for types package
kingpinXD Mar 20, 2024
d432e40
add comments
kingpinXD Mar 20, 2024
071ea29
resolve comments
kingpinXD Mar 21, 2024
b79405d
modify comments based on suggestions
kingpinXD Mar 22, 2024
b67126a
add error message for add revert
kingpinXD Mar 22, 2024
2c856b0
replace broken eth rpc
kingpinXD Mar 22, 2024
6af6ba2
directly modify fungible state in SetupStateForProcessLogsZetaSent
kingpinXD Mar 22, 2024
effde3f
Rebase develop
kingpinXD Mar 22, 2024
861b635
set withdrawals to pending outbound
kingpinXD Mar 25, 2024
3390b3d
append status message if not empty
kingpinXD Mar 25, 2024
b868315
rebase develop 2
kingpinXD Mar 25, 2024
f1cdbf9
Merge branch 'develop' into refactor-inbound-vote
lumtis Mar 26, 2024
a5a43e9
Update changelog.md
kingpinXD Mar 26, 2024
40c8aac
add issue https://github.com/zeta-chain/node/issues/1951
kingpinXD Mar 26, 2024
7e2ac61
adjust changelog
kingpinXD Mar 28, 2024
a89f2ba
rebase develop 3
kingpinXD Apr 1, 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
Prev Previous commit
Next Next commit
add defer to recover from panic if config is already set
kingpinXD committed Mar 6, 2024
commit 822d4d4d715f745192ccef75d3b99b6923e64f8c
6 changes: 6 additions & 0 deletions x/authority/types/policies_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types_test

import (
"fmt"
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
@@ -12,6 +13,11 @@ import (

// setConfig sets the global config to use zeta chain's bech32 prefixes
func setConfig() {
defer func() {
if r := recover(); r != nil {
fmt.Println("config is already sealed", r)
kingpinXD marked this conversation as resolved.
Show resolved Hide resolved
}
}()
cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub)
cfg.Seal()
13 changes: 6 additions & 7 deletions x/emissions/abci_test.go
Original file line number Diff line number Diff line change
@@ -165,12 +165,6 @@ func TestDistributeObserverRewards(t *testing.T) {
err = sk.BankKeeper.MintCoins(ctx, emissionstypes.ModuleName, totalRewardCoins)
require.NoError(t, err)
// Set starting emission for all observers to 100 so that we can calculate the rewards and slashes
for _, observer := range observerSet.ObserverList {
k.SetWithdrawableEmission(ctx, emissionstypes.WithdrawableEmissions{
Address: observer,
Amount: sdkmath.NewInt(100),
})
}

tt := []struct {
name string
@@ -256,6 +250,12 @@ func TestDistributeObserverRewards(t *testing.T) {
}
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
for _, observer := range observerSet.ObserverList {
k.SetWithdrawableEmission(ctx, emissionstypes.WithdrawableEmissions{
Address: observer,
Amount: sdkmath.NewInt(100),
})
}
params := emissionstypes.DefaultParams()
params.ObserverSlashAmount = tc.slashAmount
k.SetParams(ctx, params)
@@ -274,7 +274,6 @@ func TestDistributeObserverRewards(t *testing.T) {
Height: 0,
BallotsIndexList: ballotIdentifiers,
})

ctx = ctx.WithBlockHeight(100)
err := emissionsModule.DistributeObserverRewards(ctx, tc.totalRewardsForBlock, *k)
require.NoError(t, err)