Skip to content

Commit

Permalink
Merge branch 'main' into bweng-config-log-level
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng authored Apr 18, 2023
2 parents afc4857 + f6b5219 commit 5bf81b6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -43,14 +43,38 @@ 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
needs: split-test-files
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
Expand Down Expand Up @@ -83,4 +107,4 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
path: ./${{ matrix.part }}profile.out
8 changes: 8 additions & 0 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const (
FlagInterBlockCache = "inter-block-cache"
FlagUnsafeSkipUpgrades = "unsafe-skip-upgrades"
FlagTrace = "trace"
FlagTracing = "tracing"
FlagProfile = "profile"
FlagInvCheckPeriod = "inv-check-period"

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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')")
Expand Down
2 changes: 1 addition & 1 deletion store/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion x/accesscontrol/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5bf81b6

Please sign in to comment.