Skip to content

Commit

Permalink
Add more debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
iKapitonau committed Sep 26, 2024
1 parent a95b51a commit 5d7f1d9
Show file tree
Hide file tree
Showing 127 changed files with 21,058 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cosmos-sdk-store/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ func (rs *Store) WorkingHash() []byte {
if store.GetStoreType() != types.StoreTypeIAVL {
continue
}
fmt.Printf(">>>>>>> STORE OF %s <<<<<<<\n", key.Name())

if !rs.removalMap[key] {
si := types.StoreInfo{
Expand All @@ -531,6 +532,7 @@ func (rs *Store) WorkingHash() []byte {
}
storeInfos = append(storeInfos, si)
}
fmt.Printf("<<<<<<< END OF STORE OF %s >>>>>>>\n", key.Name())
}

sort.SliceStable(storeInfos, func(i, j int) bool {
Expand Down
1 change: 1 addition & 0 deletions deployment/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ COPY Makefile .
RUN true
COPY client client
COPY cosmos-sdk-store cosmos-sdk-store
COPY iavl iavl

RUN ln -s /usr/lib/x86_64-linux-gnu/liblz4.so /usr/local/lib/liblz4.so && ln -s /usr/lib/x86_64-linux-gnu/libzstd.so /usr/local/lib/libzstd.so

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace (
cosmossdk.io/store => ./cosmos-sdk-store
github.com/cometbft/cometbft => github.com/scrtlabs/tendermint v0.38.10-0.20240924173150-b47eda4ca72b
github.com/cosmos/cosmos-sdk => github.com/scrtlabs/cosmos-sdk v0.46.0-beta2.0.20240917201403-3c75382e4a9d
github.com/cosmos/iavl => github.com/scrtlabs/iavl v1.1.2-secret.1
github.com/cosmos/iavl => ./iavl
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,6 @@ github.com/scrtlabs/cosmos-sdk v0.46.0-beta2.0.20240917201403-3c75382e4a9d h1:IW
github.com/scrtlabs/cosmos-sdk v0.46.0-beta2.0.20240917201403-3c75382e4a9d/go.mod h1:9oxg/QW7VVnOzIip9DRJNAmSnzjSFwX3b350xv94D1I=
github.com/scrtlabs/cosmos-sdk-api v0.7.5-secret.1 h1:4GLC5nv9pkCEUD4HpSpsnuDMYPT5Bly+IKPi/7H/ylk=
github.com/scrtlabs/cosmos-sdk-api v0.7.5-secret.1/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
github.com/scrtlabs/iavl v1.1.2-secret.1 h1:JX5h2U5Q/GxfVhUAm3rDgbaY2Rko7meCbVT2aJDigxw=
github.com/scrtlabs/iavl v1.1.2-secret.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM=
github.com/scrtlabs/tendermint v0.38.10-0.20240924173150-b47eda4ca72b h1:vBdj5WibgXocSZLOST1NAr7V+c20ZHURJbdjuj47q/s=
github.com/scrtlabs/tendermint v0.38.10-0.20240924173150-b47eda4ca72b/go.mod h1:AOeJIF/ftEqSywfsOcRexP0Zv2tNK78fdUcf7Vl75ns=
github.com/scrtlabs/tm-secret-enclave v1.11.8 h1:fctIfJDHGl8D+fcXlZLX6S4yDeePIsuyzdG5HngFNPQ=
Expand Down
2 changes: 2 additions & 0 deletions iavl/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Primary repo maintainers
* @cosmos/sdk-core-dev
16 changes: 16 additions & 0 deletions iavl/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
labels:
- T:dependencies
47 changes: 47 additions & 0 deletions iavl/.github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 9

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- S:wip

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

Limit to only `issues` or `pulls`
only: pulls

Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
pulls:
daysUntilStale: 30
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
19 changes: 19 additions & 0 deletions iavl/.github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Benchmarks

on:
push:
branches:
- master
pull_request:

jobs:
Benchmarks:
runs-on: ubuntu-latest
container: ghcr.io/notional-labs/cosmos
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20' # The Go version to download (if necessary) and use.
- name: run benchmarks
run: make bench
30 changes: 30 additions & 0 deletions iavl/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test
on:
push:
branches:
- master
pull_request:

jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20' # The Go version to download (if necessary) and use.

# Some tests, notably TestRandomOperations, are extremely slow in CI
# with the race detector enabled, so we use -short when -race is
# enabled to reduce the number of slow tests, and then run without
# -short with -race disabled for a larger test set. The same tests
# are run, just with smaller data sets.
#
# We also do a 32-bit run. Even though this is executed on a 64-bit
# system, it will use 32-bit instructions and semantics (e.g. 32-bit
# integer overflow).
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 10m -short -race -coverprofile=coverage.txt -covermode=atomic
go test ./... -mod=readonly -timeout 15m
GOARCH=386 go test ./... -mod=readonly -timeout 15m
41 changes: 41 additions & 0 deletions iavl/.github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "15 1 * * 5"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ go ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
22 changes: 22 additions & 0 deletions iavl/.github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
contents: read

jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions iavl/.github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint
# Lint runs golangci-lint over the entire cosmos-sdk repository
# This workflow is run on every pull request and push to master
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed.
on:
pull_request:
push:
branches:
- master
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: 🐿 Setup Golang
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: golangci-lint
run: make lint
18 changes: 18 additions & 0 deletions iavl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
vendor
.glide
*.swp
*.swo

# created in test code
test.db

# profiling data
*\.test
cpu*.out
mem*.out
cpu*.pdf
mem*.pdf

# IDE files
.idea/*
.vscode/*
2 changes: 2 additions & 0 deletions iavl/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
image: ghcr.io/notional-labs/cosmos:latest

66 changes: 66 additions & 0 deletions iavl/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
run:
tests: true
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m

linters:
disable-all: true
enable:
- bodyclose
- dogsled
- errcheck
- exportloopref
- goconst
- gocritic
- gofumpt
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- nolintlint
- prealloc
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
nolintlint:
allow-leading-space: true
require-explanation: false
require-specific: true

issues:
exclude-rules:
- text: "Use of weak random number generator"
linters:
- gosec
- text: "comment on exported var"
linters:
- golint
- text: "don't use an underscore in package name"
linters:
- golint
- text: "should be written without leading space as"
linters:
- nolintlint
- text: "ST1003:"
linters:
- stylecheck
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
# https://github.com/dominikh/go-tools/issues/389
- text: "ST1016:"
linters:
- stylecheck
- path: "migrations"
text: "SA1019:"
linters:
- staticcheck

max-issues-per-linter: 10000
max-same-issues: 10000
42 changes: 42 additions & 0 deletions iavl/.mergify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
queue_rules:
- name: default
conditions:
- "#approved-reviews-by>1"

pull_request_rules:
- name: automerge to main with label automerge and branch protection passing
conditions:
- "#approved-reviews-by>1"
- base=master
- label=A:automerge
actions:
queue:
name: default
method: squash
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
- name: backport patches to v0.19.x branch
conditions:
- base=master
- label=backport/v0.19.x
actions:
backport:
branches:
- release/v0.19.x
- name: backport patches to v0.20.x branch
conditions:
- base=master
- label=backport/v0.20.x
actions:
backport:
branches:
- release/v0.20.x
- name: backport patches to v1.x branch
conditions:
- base=master
- label=backport/v1.x
actions:
backport:
branches:
- release/v1.x.x
Loading

0 comments on commit 5d7f1d9

Please sign in to comment.