Skip to content

Fix misleading field naming #436

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

Open
wants to merge 1 commit into
base: feat/optimism
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 2 deletions rolling-shutter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,6 @@ github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYED
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
github.com/shutter-network/shop-contracts v0.0.0-20231220085304-80b8977d0bca h1:05Ghqw3FqH/UFuYIzc7z6GJyHk3HxAqY3iuY4L3x4Ow=
github.com/shutter-network/shop-contracts v0.0.0-20231220085304-80b8977d0bca/go.mod h1:LEWXLRruvxq9fe2oKtJI3xfzbauhfWTjOczHN61RU+4=
github.com/shutter-network/shutter/shlib v0.1.13 h1:9YloDJBdhFAKm2GMg4gBNeaJ+Mw9Qzeh5Kz9A2ayp1E=
github.com/shutter-network/shutter/shlib v0.1.13/go.mod h1:RlYNZjx+pfKAi0arH+jfdlxG4kQ75UFzDfVjgCVYaUw=
github.com/shutter-network/shutter/shlib v0.1.15 h1:HsAL3h5govZjFcHaox2Nf1DxawCjTcR0qNb+08YaM5c=
github.com/shutter-network/shutter/shlib v0.1.15/go.mod h1:RlYNZjx+pfKAi0arH+jfdlxG4kQ75UFzDfVjgCVYaUw=
github.com/shutter-network/txtypes v0.1.0 h1:QqdiiiB9AiBCSJ/ke6z1ZoDGfu2+1Lgpz5vHzVN4FKc=
Expand Down
2 changes: 1 addition & 1 deletion rolling-shutter/keyperimpl/optimism/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func BootstrapValidators(config *Config) error {
ks.ActivationBlock,
ks.Members,
ks.Threshold,
ks.Eon,
ks.Index,
)

err = ms.SendMessage(ctx, batchConfigMsg)
Expand Down
4 changes: 2 additions & 2 deletions rolling-shutter/keyperimpl/optimism/keyper.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ func (kpr *Keyper) newBlock(_ context.Context, ev *syncevent.LatestBlock) error
func (kpr *Keyper) newKeyperSet(ctx context.Context, ev *syncevent.KeyperSet) error {
log.Info().
Uint64("activation-block", ev.ActivationBlock).
Uint64("eon", ev.Eon).
Uint64("index", ev.Index).
Msg("new keyper set added")
return kpr.dbpool.BeginFunc(ctx, func(tx pgx.Tx) error {
obskeyperdb := obskeyper.New(tx)

keyperConfigIndex, err := medley.Uint64ToInt64Safe(ev.Eon)
keyperConfigIndex, err := medley.Uint64ToInt64Safe(ev.Index)
if err != nil {
return errors.Wrap(err, ErrParseKeyperSet.Error())
}
Expand Down
2 changes: 1 addition & 1 deletion rolling-shutter/medley/chainsync/event/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type (
ActivationBlock uint64
Members []common.Address
Threshold uint64
Eon uint64
Index uint64

AtBlockNumber *number.BlockNumber `json:",omitempty"`
}
Expand Down
9 changes: 5 additions & 4 deletions rolling-shutter/medley/chainsync/syncer/keyperset.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (s *KeyperSetSyncer) getInitialKeyperSets(ctx context.Context) ([]*event.Ke
return nil, err
}

for i := ks.Eon + 1; i < numKS; i++ {
for i := ks.Index + 1; i < numKS; i++ {
ks, err = s.GetKeyperSetByIndex(ctx, opts, i)
if err != nil {
return nil, err
Expand Down Expand Up @@ -237,16 +237,17 @@ func (s *KeyperSetSyncer) newEvent(
if err != nil {
return nil, makeCallError("Threshold", err)
}
eon, err := s.Contract.GetKeyperSetIndexByBlock(opts, activationBlock)
keyperSetIndex, err := s.Contract.GetKeyperSetIndexByBlock(opts, activationBlock)
if err != nil {
return nil, makeCallError("KeyperSetIndexByBlock", err)
}
return &event.KeyperSet{
ActivationBlock: activationBlock,
Members: members,
Threshold: threshold,
Eon: eon,
AtBlockNumber: number.BigToBlockNumber(opts.BlockNumber),
Index: keyperSetIndex,

AtBlockNumber: number.BigToBlockNumber(opts.BlockNumber),
}, nil
}

Expand Down