diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22747e114..bfbc4220d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,8 +24,8 @@ jobs: go-version: 1.19 - name: Create a file with all core Cosmos SDK pkgs run: go list ./... > pkgs.txt - - name: Split pkgs into 4 files - run: split -d -n l/4 pkgs.txt pkgs.txt.part. + - name: Split pkgs into 10 files + run: split -d -n l/10 pkgs.txt pkgs.txt.part. # cache multiple - uses: actions/upload-artifact@v3 with: @@ -43,6 +43,30 @@ jobs: with: name: "${{ github.sha }}-03" path: ./pkgs.txt.part.03 + - uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-04" + path: ./pkgs.txt.part.04 + - uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-05" + path: ./pkgs.txt.part.05 + - uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-06" + path: ./pkgs.txt.part.06 + - uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-07" + path: ./pkgs.txt.part.07 + - uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-08" + path: ./pkgs.txt.part.08 + - uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-09" + path: ./pkgs.txt.part.09 tests: runs-on: ubuntu-latest @@ -50,7 +74,7 @@ jobs: strategy: fail-fast: false matrix: - part: ["00", "01", "02", "03"] + part: ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09"] steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 @@ -83,4 +107,4 @@ jobs: - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-coverage" - path: ./${{ matrix.part }}profile.out \ No newline at end of file + path: ./${{ matrix.part }}profile.out diff --git a/server/start.go b/server/start.go index c4b4d881a..d0df3a90d 100644 --- a/server/start.go +++ b/server/start.go @@ -52,6 +52,7 @@ const ( FlagInterBlockCache = "inter-block-cache" FlagUnsafeSkipUpgrades = "unsafe-skip-upgrades" FlagTrace = "trace" + FlagTracing = "tracing" FlagProfile = "profile" FlagInvCheckPeriod = "inv-check-period" @@ -167,11 +168,17 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. panic(fmt.Sprintf("genesis file chain-id=%s does not equal config.toml chain-id=%s", genesisFile.ChainID, clientCtx.ChainID)) } + if enableTracing, _ := cmd.Flags().GetBool(FlagTracing); !enableTracing { + serverCtx.Logger.Info("--tracing not passed in, tracing is not enabled") + tracerProviderOptions = []trace.TracerProviderOption{} + } + withTM, _ := cmd.Flags().GetBool(flagWithTendermint) if !withTM { serverCtx.Logger.Info("starting ABCI without Tendermint") return startStandAlone(serverCtx, appCreator) } + // amino is needed here for backwards compatibility of REST routes exitCode := RestartErrorCode @@ -224,6 +231,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. cmd.Flags().Bool(FlagInterBlockCache, true, "Enable inter-block caching") cmd.Flags().String(flagCPUProfile, "", "Enable CPU profiling and write to the provided file") cmd.Flags().Bool(FlagTrace, false, "Provide full stack traces for errors in ABCI Log") + cmd.Flags().Bool(FlagTracing, false, "Enable Tracing for the app") cmd.Flags().Bool(FlagProfile, false, "Enable Profiling in the application") cmd.Flags().String(FlagPruning, storetypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") cmd.Flags().Uint64(FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index e2b2e95a4..09ec484a4 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -1020,7 +1020,7 @@ func (rs *Store) flushMetadata(db dbm.DB, version int64, cInfo *types.CommitInfo if err := batch.WriteSync(); err != nil { panic(fmt.Errorf("error on batch write %w", err)) } - fmt.Printf("App State Saved height=%d hash=%X\n", cInfo.CommitID().Version, cInfo.CommitID().Hash) + rs.logger.Info("App State Saved height=%d hash=%X\n", cInfo.CommitID().Version, cInfo.CommitID().Hash) } type storeParams struct { diff --git a/x/accesscontrol/handler.go b/x/accesscontrol/handler.go index d434a7946..d950dd1da 100644 --- a/x/accesscontrol/handler.go +++ b/x/accesscontrol/handler.go @@ -11,7 +11,10 @@ import ( func HandleMsgUpdateResourceDependencyMappingProposal(ctx sdk.Context, k *keeper.Keeper, p *types.MsgUpdateResourceDependencyMappingProposal) error { for _, resourceDepMapping := range p.MessageDependencyMapping { - k.SetResourceDependencyMapping(ctx, resourceDepMapping) + err := k.SetResourceDependencyMapping(ctx, resourceDepMapping) + if err != nil { + return err + } } return nil }