Commit Graph

176 Commits

Author SHA1 Message Date
MiniFrenchBread
759d08a6eb fix: app
Some checks failed
Continuous Integration (Commit) / lint (push) Has been cancelled
2024-10-29 19:29:44 +08:00
0g-wh
5bd6ac39ee fix 2024-09-26 09:42:10 +00:00
0g-wh
e0fcd07a08 Merge branch 'dev' of github.com:0glabs/0g-chain into dev 2024-09-25 15:43:41 +00:00
MiniFrenchBread
0c02c27a9d feat: DASigners change params (#67)
* feat: use gov to manage dasigners params

* feat: evm precompile query func

* test: unit test

* feat: remove epoch and block height hard check

* feat: add params event
2024-09-25 15:23:46 +00:00
Solovyov1796
4ebbb886bf add conuncil back 2024-09-25 15:22:54 +00:00
MiniFrenchBread
57943ec0e0 fix: missing designers (#62)
* fix: add dasigners back

* test: remove manually initialize genesis

* feat: generate all missing epochs on begin block; only panic on smaller block height

* chore: add logs, fix EpochBlocks
2024-09-25 15:22:42 +00:00
0g-wh
53dcea2867 clean code 2024-09-25 15:20:46 +00:00
aeryz
d31a599c60 feat: add 08-wasm module
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
2024-09-25 15:20:46 +00:00
0g-wh
822e374be6 rebase to kava cosmos 0.47 upgrade
rename

rename

tidy

clean code
2024-09-25 15:18:12 +00:00
0xsatoshi
5f4f1851cb fix 2024-09-25 15:14:33 +00:00
0xsatoshi
4c28427089 fix 2024-09-25 15:14:33 +00:00
Solovyov1796
46378d6157 remove das module 2024-09-25 15:11:28 +00:00
MiniFrenchBread
17fa02b554 feat: precompile 2024-09-25 15:10:47 +00:00
0xsatoshi
e952a4a705 fix 2024-09-25 15:08:11 +00:00
Solovyov1796
849c95d93e fix unit test for x 2024-09-25 15:08:01 +00:00
Solovyov1796
4cf57457a7 add 0g code 2024-09-25 15:07:54 +00:00
Solovyov1796
337f1c5cc8 rename kava 2024-09-25 15:07:33 +00:00
Solovyov1796
e8008c9a3a remove useless modules 2024-09-25 15:03:21 +00:00
Solovyov1796
28fa4b7993 rename go mod path 2024-09-25 15:00:59 +00:00
MiniFrenchBread
27feb30bb9
feat: DASigners change params (#67)
Some checks failed
Continuous Integration (Commit) / lint (push) Has been cancelled
* feat: use gov to manage dasigners params

* feat: evm precompile query func

* test: unit test

* feat: remove epoch and block height hard check

* feat: add params event
2024-09-24 09:39:16 +08:00
0g-wh
568ff70ad7
Merge pull request #63 from Solovyov1796/local-dev
Some checks failed
Continuous Integration (Commit) / lint (push) Has been cancelled
add conuncil back
2024-08-10 10:25:04 +08:00
MiniFrenchBread
1355bd6ab1
fix: missing designers (#62)
* fix: add dasigners back

* test: remove manually initialize genesis

* feat: generate all missing epochs on begin block; only panic on smaller block height

* chore: add logs, fix EpochBlocks
2024-08-10 10:24:11 +08:00
Solovyov1796
ceb4d774ff add conuncil back 2024-08-10 10:18:21 +08:00
Nick DeLuca
ab3cf7c994
feat!(precompile): Add registry and genesis tests (#1999)
* feat!(precompile): Add registry and genesis tests

Based on evgeniy-scherbina's work, this adds a new precompile module
which defines a contract moudule with an example noop contract that
will be will be used for implementing test functions.  In addition,
it defines a registry module that instantiates stateful precompile
contracts and associates them with an address in a global registry
defined in kava-labs/go-ethereum. See precompile/README.md for more
information.

The kava-labs/go-ethereum and kava-labs/etheremint replace statements
are updated to support these changes as well as an update to kvtool
which includes genesis state for the registry.NoopContractAddress and
initializes the contract's EthAccount with a non-zero sequence and
codehash set to keccak256(0x01), and sets the contract code to 0x01.
See tests/e2e/e2e_precompile_genesis_test.go for an overview of the
expected genesis state for an enabled precompile.

Co-authored-by: evgeniy-scherbina <evgeniy.shcherbina.es@gmail.com>

* chore: Precompile readme improvements

This fixes a typo (import -> important) and uses package terminology
instead of unclear module terminology.  This aligns best with golang
terminology were modules and packages are distinctly different and
modules are defined using go.mod.

* chore: Improve noop contract godoc

Add a more meaningful godoc where the noop contract is constructed.

* chore(e2e): Improve comments around query checks

Improve the clarity of comments around where the error is checked for
accounts and why it is not checked directly.

In addition, improve comment on why both grpc and rpc code is fetched
and where they are used.

---------

Co-authored-by: evgeniy-scherbina <evgeniy.shcherbina.es@gmail.com>
2024-08-09 09:55:31 -07:00
0g-wh
bd3d947e9b clean code 2024-08-04 15:25:53 +08:00
aeryz
a8c86f7f8b feat: add 08-wasm module
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
2024-08-04 15:23:35 +08:00
0g-wh
c949c06fce rebase to kava cosmos 0.47 upgrade
rename

rename

tidy

clean code
2024-08-03 15:05:14 +08:00
0xsatoshi
8d761147a2 fix 2024-08-03 15:05:14 +08:00
0xsatoshi
4917eb5976 fix 2024-08-03 15:05:14 +08:00
Solovyov1796
c7ed82b4f4 remove das module 2024-08-03 15:04:55 +08:00
MiniFrenchBread
b53783447b feat: precompile 2024-08-03 15:04:55 +08:00
0xsatoshi
3da66a87e6 fix 2024-08-03 15:04:48 +08:00
Solovyov1796
34a76200f0 fix unit test for x 2024-08-03 15:04:48 +08:00
Solovyov1796
89d3829646 add 0g code 2024-08-03 15:04:48 +08:00
Solovyov1796
ffad9dbdd5 rename kava 2024-08-03 15:04:46 +08:00
Solovyov1796
454733f55b remove useless modules 2024-08-03 15:04:32 +08:00
Solovyov1796
14e1e3a7d4 rename go mod path 2024-08-03 15:03:23 +08:00
Evgeniy Scherbina
58d7c89f8e
Replace opendb package from kava with generic opendb repo (#1959)
* Upgrade ethermint

* Remove opendb package from kava and add custom dbOpener function

* Open metadata.db with custom opendb function
2024-07-11 09:23:31 -04:00
drklee3
d2d661276e
feat: Use x/precisebank for x/evm keeper (#1960)
Replace x/evmutil EvmBankKeeper usage for x/evm
2024-07-10 14:20:12 -07:00
drklee3
4cf41d18c2
feat(x/precisebank): Implement GetBalance (#1916)
Implement GetBalance for extended balances which passes through to `x/bank` for non-extended denoms. This diverges from `x/evmutil` behavior which will panic on non-"akava" calls.

Add bank / account keeper mocks for testing, with mockery config for [mockery package setup](https://vektra.github.io/mockery/latest/migrating_to_packages/)
2024-05-21 14:11:13 -07:00
drklee3
3c53e72220
feat: Add x/precisebank module basic setup (#1906)
- Add initial setup and empty genesis type for x/precisebank
- Basic tests with mostly empty values, to be filled out with additional implementation
2024-05-10 09:30:28 -07:00
Draco
5c0f27b952
Add ibc packet forward middleware for ibc transfer (#1839)
* Add ibc packet forward middleware for ibc transfer

* Update changelog for ibc packet forwarding
2024-03-07 16:47:46 -05:00
Levi Schoen
2bc0c62570
register solomachine module for v6 to v7 ibc-go migration (#1831) 2024-02-16 12:49:58 -05:00
Draco
614d4e40fe
Update cosmos-sdk to v0.47.7 (#1811)
* Update cometbft, cosmos, ethermint, and ibc-go

* Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft

* Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db

* Replace gogo/protobuf with cosmos/gogoproto & simapp replacement

* Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims

* Remove no longer used simulations

* Replace ibchost with ibcexported
See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants

* Add new consensus params keeper

* Add consensus keeper to blockers

* Fix keeper and module issues in app.go

* Add IsSendEnabledCoins and update SetParams interface changes

* Fix protobuf build for cosmos 47 (#1800)

* fix cp errors by using -f; fix lint by only linting our proto dir;
and use proofs.proto directly from ics23 for ibc-go v7

* run proto-all; commit updated third party deps and swagger changes

* regenerate proto files

* use correct gocosmos build plugin for buf

* re-gen all protobuf files to update paths for new gocosmos plugin

* update protoc and buf to latest versions

* fix staking keeper issues in app.go

* update tally handler for gov changes

* chain id fix and flag fixes

* update deps for cometbft 47.7 upgrade

* remove all module legacy queriers

* update stakingKeeper to pointer

* Replace ModuleCdc from govv1beta1 to govcodec

* remove simulations

* abci.LastCommitInfo → abci.CommitInfo

* Remove unused code in keys.go

* simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi

* Fix chain id issues in tests

* Fix remaining unit test issues

* Update changelog for upgrade

* Fix e2e tests using updated kvtool

* Update protonet to v47 compatible genesis

* Bump cometbft-db to v0.9.1-kava.1

* Update kvtool

* Remove extra changelog

* Fix merged rocksdb issues

* go mod cleanup

* Bump cometbft-db to v9 and go to 1.21

* Bump rocksdb version to v8.10.0

* Update kvtool to latest version

* Update gin to v1.9.0

* Use ibctm.ModuleName in app_test

* Fallback to genesis chain id instead of client toml

* Remove all simulations

* Fix cdp migrations issue with v47

* Update dependencies to correct tags

---------

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2024-02-06 17:54:10 -05:00
drklee3
395b69ac2f
feat(community): add MsgUpdateParams for governance (#1745)
* Add authority, MsgUpdateParams

* Add e2e test for x/community UpdateParamsMsg proposal

* Ensure new params are different

* Add errors and update codec

* Update changelog

* Use single reused govAuthorityAddr

* Add unit tests for authority and msg

* Validate authority address

* Update proto comment

* Check for ErrInvalidSigner in invalid authority error
2023-10-11 10:22:25 -07:00
Nick DeLuca
102cc0fff3
Community Pool Staking Rewards Implementation & Improvements (#1742)
* add new field upgrade_time_set_staking_rewards_per_second with intention
of integrating into the disable inflation logic to set an initial
staking reward time

* when the disable inflation upgrade time occurs, set the staking rewards
per second to the value specified by the new
upgrade_time_set_staking_rewards_per_second.  This will allow a decoupled
implementation between the ugprade switching logic, and the core
functionality of paying staking rewards from the pool

* add staking rewards state to community keeper and community module
genesis that is required to calculate and track staking reward payouts
accross blocks

* add implementation of staking reward payouts

* remove unused error

* touch up tests and add a test case that fully tests behavior when pool
is drained

* add function comments

* refactor and pull out main calculation to private pure function with
no dependence on keeper

* zero out default parameters -- these are too chain specific to have
useful defaults

* small touch ups on comments, test cases

* use correct Int from sdkmath, not old sdk types; update protonet genesis
for new parmater

* fix copy pasta comment

* use bond denom from staking keeper instead of referncing ukava directly

* add staking reward state for valid genesis

* update kvtool genesis for new params and rewards state
2023-10-03 08:41:54 -07:00
Draco
43be3815cc
feat: disable inflation upgrade logic (#1706)
* feat: disable inflation upgrade logic

* improve disable inflation comments

* add upgrade tests

* update changelog

* split disable inflation upgrade and the upgrade check

* remove pay rewards logic

* clean up incentives test

* add abci test

* refactor upgradeTime and blockTime check

* fix abci test

* fix wrong pr in changelog

* refactor disable inflation tests, behavior, and implementation
  - Unit tests are now shared between keeper and abci begin blocker
    since behavior is 100% the same
  - ABCI is unaware of keeper initial keeper logic branch (keeper
    methods required to be called in certain order by begin blocker)
  - Behavior of zero time is changed -- this now doesn't run for the
    zero time.  This is more ideal for new chains (genesis should set
    all correct state instead of relying on inflation disable logic),
    and allows for a simpler implementation.
  - Begin blocker now panics if parameters are not in state

* remove previous tests and implementation

* remove previous block time keeper state -- not needed for inflation
disalbing

* move inflation disabling to private method and add more comments

* remove unused key

* use correct spelling for idempotence

---------

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2023-10-02 13:10:22 -07:00
Ruaridh
bc260d8091
feat(community): add switchover param (#1704)
* add community params type

* add get/set params methods

* add community genesis state type

* add community init/export genesis

* add querier methods for params

* add query cli cmd

* update changelog

* update protonet genesis

* Add `RewardsPerSecond` param to `x/community` module (#1707)

* Add RewardsPerSecond param to community

* Update rewards per second param to int

* Add rewards_per_second to protonet genesis

* Use default rewards per second of 744191

* Include value if negative in Validate error

* Rename RewardsPerSecond param to StakingRewardsPerSecond

* Add changelog entry

* Add param migration, update consensus version to 2

* Update proto docs

* Update staking_rewards_per_second param name in protonet genesis (#1730)

* Update godoc

Co-authored-by: Robert Pirtle <Astropirtle@gmail.com>

* add genesis state tests

* document what 0 upgrade time means

* update kvtool to include new params

---------

Co-authored-by: drklee3 <derrick@dlee.dev>
Co-authored-by: Robert Pirtle <Astropirtle@gmail.com>
2023-09-22 09:05:12 -07:00
Robert Pirtle
9a0aed7626
feat(x/metrics): add module for emiting custom chain metrics (#1668)
* initialize x/metrics with metrics collection

* include global labels in x/metrics metrics

* add x/metrics spec

* add x/metrics test coverage

* update changelog
2023-08-25 12:23:53 -07:00
Robert Pirtle
15c243224c
fix(evmutil): create module account on InitGenesis (#1655)
* fix(evmutil): create module account on InitGenesis

ensures the creation of the x/evmutil module account on init genesis.

* update changelog

* cleanup debug logging
2023-07-24 16:00:19 -07:00