Skip to content
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

Add force prune options #3

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open

Add force prune options #3

wants to merge 53 commits into from

Conversation

moniya12
Copy link
Owner

Add forceprune to CLI (Ability to compact/prune via CLI)

Closes: #XXX

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

ValarDragon and others added 10 commits April 7, 2022 16:01
* Add proto docs

* Remove go mod tidy

* Update scripts/protocgen.sh

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* Add boilerplate for stableswap

* Update proto/osmosis/gamm/pool-models/stableswap/tx.proto

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update proto/osmosis/gamm/pool-models/stableswap/tx.proto

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* rename file

* make proto-all

* Delete old pb.go file

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* second chain with tests

* add hermes, comment out balance query for now

* eventually

* Update Makefile

Co-authored-by: Roman <34196718+p0mvn@users.noreply.github.com>

* remove gas fees and unused functions

* readded check

* Nicco changes to own hermes image

* Remove unused hermes.Dockerfile

* Use a single Dockerfile for both debug and official image

* readd build hermes in makefile

* remove hermes

* Set correct golang image and use correct debug image tag

Co-authored-by: Adam Tucker <adamleetuckeer@outlook.com>
Co-authored-by: Roman <34196718+p0mvn@users.noreply.github.com>
Co-authored-by: Niccolo Raspa <nraspa@live.it>
Add forceprune to CLI (Ability to compact/prune via CLI)
Forceprune provides options to prune blockstore.db and state.db. By default, it would prune blockstore.db and state.db up to 14 days (unbounding period). In state.db while it keeps validator and consensus information up to 14 days it prunes abci responses (keeping only last 1000 blocks abci response). 
If required, one can override 14 days of blocks. 
Forceprune does not touch application.db or indexer.
@moniya12 moniya12 changed the title Update root.go Add force prune options Apr 11, 2022
@moniya12 moniya12 marked this pull request as ready for review April 11, 2022 10:23
alexanderbez and others added 18 commits April 12, 2022 10:36
NB: Previously, osmosis would apply all snapshots, then crash.

Currently, osmosis applies all snapshots, and stays live.  Because it stays live, these scripts don't work correctly.

I have a machine doing a rocksdb sync now, and hope to prune that but nothing makes tiny like statesyc.
* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates
Closes: #XXX

## Description

Realized we never updated our Github Actions CI lint job to use the canonical `make lint` target.
______

For contributor use:

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/gaia/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
* Update Makefile

Draft PR aimed at enabling fumpt linter and using golangci-lint run --fix to make developer environments match ci

* update to go1.18

* Update Makefile

* fumpt & update makefile to exclude dirs

* Update Makefile

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update Makefile

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update Makefile

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Closes: #XXX

## Description

Was having trouble running `make tools`:
```
make tools
Installing statik...
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.
make: *** [contrib/devtools/Makefile:76: /home/roman/go/bin/statik] Error 1
```

This changed helped to be able to build the tools
______

For contributor use:

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/gaia/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
* Transcribe the solved CFMM equation

* More sub-term re-use

* Add first pass of cfmm solution

* Add cfmm constant function, to test solveCfmm with

* Add test

* Add test case that has an incorrect result atm

* Fix calculation bug

* Add spot price fn

* start CFMM boilerplates

* Factor banana

* Further polynomial simplification

* Simplify equations, and re-arrange godoc

* Delete accidental contributing.md commit

* Cleanup todo

* Fix lint
* add bench

* fix approx_eq

* move binary search to amm.go

* apply comments
* Add queries for getting Upcoming gauges by denom

* rudimentary tests for denomquery

* Update proto/osmosis/incentives/query.proto

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* removed mytestnet

* fixed query tests

* fixed query tests

* Update proto/osmosis/incentives/query.proto pagination number

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update x/incentives/keeper/grpc_query.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* implemented feedback

* amended minor bug with prefixStore

* investigating BeginDistribution issues

* investigating grpc_query_test.go

* Fix grpc query test

* fixed grpc tests, added nil checks for grpc query, removed long for query.go

* additional grpcquery fixes (double if removed)

* liveliness error fix

* gofmt grpc_query_test.go

* liveliness test fixes

* liveliness test fixes

Co-authored-by: Xiangan He <xiangan@polychain.capital>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Dev Ojha <dojha@berkeley.edu>
* Fix formatting makefile cmds

* Disable remaining warning emitting linters

* Delete tools-stamp (and hopefully it stays deleted)

* Fix nit
moniya12 and others added 25 commits April 17, 2022 22:38
…is-labs#1268)

Co-authored-by: jlbit <jlbit@users.noreply.github.com>
…labs#1266)

Co-authored-by: jlbit <jlbit@users.noreply.github.com>
* refactor: ExitSwapExternAmountOut

* better name for interface extension

* implement types.PoolExitSwapExternAmountOutExtension

* update changelog

* interface assertion for PoolI in balancer pool

* err check on extendedPool.ExitSwapExternAmountOut

* ZeroDec()

* comma in calcPoolInGivenSingleOut call

* redundnet type in calcPoolInGivenSingleOut

* comment for feeRatio

* fix comment for calcPoolInGivenSingleOut and the converse

* whitespace in ExitSwapExternAmountOut

* fix changelog entry

* godoc for PoolExitSwapExternAmountOutExtension

* fmt

* gofumpt

* deduct shares on exit, make exit pool logic shared, improve names

* rename to ExitSwapExactAmountOutExtension

* comment out TestNewExitSwapShareAmountInCmd

* fix ExitSwapExactAmountOut by truncating int on return from calcPoolSharesInGivenSingleAssetOut

* revert x/gamm/cli_test.go to original state with TestNewExitSwapExternAmountOutCmd uncommented

* uncomment ExitSwapExactAmountOut in TestActiveBalancerPool

* change variable name to exitingCoins

* fmt

* Update x/gamm/keeper/pool_service.go

* Update x/gamm/pool-models/balancer/amm.go

* Update x/gamm/keeper/pool_service.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* superfluid staking docs

* superfluid staking docs

Co-authored-by: Xiangan He <xiangan@polychain.capital>
Co-authored-by: Roman <34196718+p0mvn@users.noreply.github.com>
Moved to const values, added defer close db
* Update archivenode.bash

* Update archivenode.bash

* Update archivenode.bash
* update all builders

* rbuilder images are prefixed by osmolabs

* update makefile

* use root instead of builder user and other minor changes

* correct lib path in Makefile

* LINK_STATICALLY in Makefile

* docs for builder

* update README

* changelog entry

* remove make clean from .build.sh

* improve readme

* remove spurious whitespace in Makefile

* fix formatting for build-reproducible

* update cosmwasm path in makefile

* copy from /home/builder in build-reproducible

* change wasm file pemissions to non-root
* Diagram for superfluid staking

Moving the diagram to this repo from the docs repo. 
WIP

* adding diagram image

* removed diagram, moved to chain repo

* add superfluid diagram
* superfluid staking docs

* sidebar fixes: titles

* merge conflict fix

Co-authored-by: Xiangan He <xiangan@polychain.capital>
Small fixes to the superfluid docs.

- This code is not needed, it breaks the docs site. 
- We also need absolute paths for images in order to render them in other sites.
…s#1264)

Co-authored-by: jlbit <jlbit@users.noreply.github.com>
… with zero swap fee (osmosis-labs#1254)

* add calc unit tests with 0 fees

* change test name to TestCalculateAmountOutAndIn_InverseRelationship_ZeroSwapFee
* add blockdaemon osmosis seed nodes

* fix seed node domains

* run gofmt
Closes: #XXX

## What is the purpose of the change

*Add a description of the overall background and high level changes that this PR introduces *

*(E.g.: This pull request improves documation of area A by adding ....*


## Brief change log

*(for example:)*
 
  - *The metadata is stored in the blob store on job creation time as a persistent artifact*
  - *Deployments RPC transmits only the blob storage reference*
  - *Daemons retrieve the RPC data from the blob cache*


## Testing and Verifying

*(Please pick one of the following options)*

This change is a trivial rework / code cleanup without any test coverage.

*(or)*

This change is already covered by existing tests, such as *(please describe tests)*.

*(or)*

This change added tests and can be verified as follows:

*(example:)*
  - *Added unit test that validates ...*
  - *Added integration tests for end-to-end deployment with ...*
  - *Extended integration test for ...*
  - *Manually verified the change by ...*

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? (yes / no)
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? (yes / no)
  - How is the feature or change documented? (not applicable   /   specification (`x/<module>/spec/`)  /  [Osmosis docs repo](https://github.com/osmosis-labs/docs)   /   not documented)
CodeQL is the code analysis engine developed by GitHub to automate security checks. You can analyze your code using CodeQL and display the results as code scanning alerts.

There are two main ways to use CodeQL analysis for code scanning:

- Add the CodeQL workflow to your repository. This uses the [github/codeql-action](https://github.com/github/codeql-action/) to run the CodeQL CLI. For more information, see "[Setting up code scanning for a repository](https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-actions)."
- Run the CodeQL CLI directly in an external CI system and upload the results to GitHub. For more information, see "[About CodeQL code scanning in your CI system ](https://docs.github.com/en/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system)[](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql)."

About CodeQL
CodeQL treats code like data, allowing you to find potential vulnerabilities in your code with greater confidence than traditional static analyzers.

You generate a CodeQL database to represent your codebase.
Then you run CodeQL queries on that database to identify problems in the codebase.
The query results are shown as code scanning alerts in GitHub when you use CodeQL with code scanning.
CodeQL supports both compiled and interpreted languages, and can find vulnerabilities and errors in code that's written in the supported languages.
Add panic recovery to hook logic, improve error logging for panics

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Roman <34196718+p0mvn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.