diff --git a/store/v2/root/store.go b/store/v2/root/store.go index 6faa51602c5b..ab22d3f90117 100644 --- a/store/v2/root/store.go +++ b/store/v2/root/store.go @@ -8,8 +8,6 @@ import ( "sync" "time" - "golang.org/x/sync/errgroup" - corelog "cosmossdk.io/core/log" corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" @@ -305,24 +303,14 @@ func (s *Store) Commit(cs *corestore.Changeset) ([]byte, error) { // background pruning process (iavl v1 for example) which must be paused during the commit s.pruningManager.PausePruning() - eg := new(errgroup.Group) - - // commit SC async var cInfo *proof.CommitInfo - eg.Go(func() error { - if err := s.stateCommitment.WriteChangeset(cs); err != nil { - return fmt.Errorf("failed to write batch to SC store: %w", err) - } - var scErr error - cInfo, scErr = s.stateCommitment.Commit(cs.Version) - if scErr != nil { - return fmt.Errorf("failed to commit SC store: %w", scErr) - } - return nil - }) + if err := s.stateCommitment.WriteChangeset(cs); err != nil { + return nil, fmt.Errorf("failed to write batch to SC store: %w", err) + } - if err := eg.Wait(); err != nil { - return nil, err + cInfo, err := s.stateCommitment.Commit(cs.Version) + if err != nil { + return nil, fmt.Errorf("failed to commit SC store: %w", err) } if cInfo.Version != cs.Version { diff --git a/tests/systemtests/cometbft_client_test.go b/tests/systemtests/cometbft_client_test.go index 895a03a98c62..dbaa3e6d14ee 100644 --- a/tests/systemtests/cometbft_client_test.go +++ b/tests/systemtests/cometbft_client_test.go @@ -27,7 +27,12 @@ func TestQueryStatus(t *testing.T) { cli := systest.NewCLIWrapper(t, systest.Sut, systest.Verbose) systest.Sut.StartChain(t) - resp := cli.CustomQuery("status") + var resp string + if systest.IsV2() { + resp = cli.CustomQuery("comet", "status") + } else { + resp = cli.CustomQuery("status") + } // make sure the output has the validator moniker. assert.Contains(t, resp, "\"moniker\":\"node0\"") @@ -223,7 +228,7 @@ func TestValidatorSetByHeight(t *testing.T) { } } -func TestValidatorSetByHeight_GRPCRestGateway(t *testing.T) { +func TestValidatorSetByHeight_GRPCGateway(t *testing.T) { systest.Sut.ResetChain(t) systest.Sut.StartChain(t) @@ -257,7 +262,9 @@ func TestValidatorSetByHeight_GRPCRestGateway(t *testing.T) { } func TestABCIQuery(t *testing.T) { + systest.Sut.ResetChain(t) systest.Sut.StartChain(t) + _ = systest.Sut.AwaitNextBlock(t, time.Second*3) qc := cmtservice.NewServiceClient(systest.Sut.RPCClient(t)) cdc := codec.NewProtoCodec(codectypes.NewInterfaceRegistry())