-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(appchain): add unit tests #225
feat(appchain): add unit tests #225
Conversation
x/avs handles the assetID validation
- Anyone can create a subchain via a simple transaction. The genesis file is available at the end of the current epoch. - If no operators opt in by that time, it is dropped. - If the state is available, it is queried via CLI and added to the genesis file of the subchain. - The genesis file, with data from other modules, starts the chain once enough vote power is live
The AVS module now validates the assetIDs passed to it
negative duration is also not supported
The wrapped consensus key object has utility in the subscriber module as well, and, may have some utility in the coordinator module. Hence, it is better located in a `types` subpackage.
* fix: use NST instead of LST * fix: use len==0 to include both nil and empty []byte * test: add precompile test for NST
ExocoreNetwork#208) * add rest api to query token-index, update price-feeder to panic at error initialization * lint
* fix: update cache when assetID updated in params * fix:update params with latest params when do recache * remove debug log
…oreNetwork#207) * detail the return error for operator info * adjust the error handling in beginBlock and endBlock * rebase and fix the conflict
* remove useless and unsafe precompilation methods * add some coments for avs * fix unnecessary iterations * removing submitProof functionalities * fix precompile args check * fix non zero-based sequential constants
* detail the return error for operator info * add a cli to query the opted info for specified operator and avs * remove the redundant code regarding the command line of operator module * add parameter for url of the google api when defining RPC * check the AVS address and convert it to lower case in the command line
* fix: RTE-01 * fix: GWT-01 * refactor: optimize shared code * fix: ENO-01 * fix(test): fix the claim reward test * fix: validate auth addr as bech32 * fix(feedistr): add authority validation
TODO: rewards_test.go is still failing
for _, update := range m { | ||
out = append(out, update) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
|
||
import ( | ||
context "context" | ||
reflect "reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import Note
package types | ||
|
||
import ( | ||
reflect "reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import Note
frac, err := sdk.NewDecFromStr(k.GetSubscriberParams(ctx).SubscriberRedistributionFraction) | ||
if err != nil { | ||
// should not happen since we validated this in the params | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
if err != nil { | ||
// It is the common behavior in cosmos-sdk to panic if SendCoinsFromModuleToModule | ||
// returns error. | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
if err != nil { | ||
// It is the common behavior in cosmos-sdk to panic if SendCoinsFromModuleToModule | ||
// returns error. | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
if err != nil { | ||
// This should never happen as the pubkey is assumed | ||
// to be stored correctly in ApplyCCValidatorChanges. | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
if err != nil { | ||
// This should never happen as the pubkey is assumed | ||
// to be stored correctly in ApplyCCValidatorChanges. | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
"height", height, "vscID", vscID, | ||
) | ||
|
||
am.keeper.TrackHistoricalInfo(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
} | ||
|
||
// EndBlock contains the logic that is automatically triggered at the end of each block | ||
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { | ||
return am.keeper.EndBlock(ctx) | ||
// send rewards to coordinator | ||
am.keeper.EndBlockSendRewards(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs. |
Includes #176 and #187