Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion decentralized-api/internal/server/public/get_epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type EpochResponse struct {
ActiveConfirmationPocEvent *types.ConfirmationPoCEvent `json:"active_confirmation_poc_event,omitempty"`
}

// LatestEpochDto, had to indroduced it, because types.Epoch doesn't serialize when
// LatestEpochDto, had to introduce it, because types.Epoch doesn't serialize when
// Index and PocStartBlockHeight are 0
type LatestEpochDto struct {
Index uint64 `json:"index"`
Expand Down
2 changes: 1 addition & 1 deletion decentralized-api/internal/validation/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The nodes might be unavailable and we will lose the validation request.

1. Create a `InferenceValidationTaskStorage` interface and it's first implementation: `InMemoryInferenceValidationTaskStorage`
2. In `event_listener.go` instead of immediately spawning a goroutine, we will store the validation request in the `InferenceValidationTaskStorage`
3. `InferenceValidator` now will spawn a woker pool that will periodically check the tasks in the storage and execute them when nodes are available
3. `InferenceValidator` now will spawn a worker pool that will periodically check the tasks in the storage and execute them when nodes are available

# 3. Persistent validation task storage

Expand Down
2 changes: 1 addition & 1 deletion inference-chain/app/ante_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (d ValidationEarlyRejectDecorator) checkValidationMsg(ctx sdk.Context, msg
"inferenceId", msg.InferenceId,
)
// It may filter legit transaction if the node is behind (node lag / state sync),
// But hope that it will be propogated by other nodes
// But hope that it will be propagated by other nodes
// TODO: In the next release, skip the filter on CheckTx, and enforce only on DeliverTx.
return inferencetypes.ErrInferenceNotFound
}
Expand Down
2 changes: 1 addition & 1 deletion inference-chain/cmd/inferenced/cmd/sync_snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func SetTrustedBlock() *cobra.Command {
}

if err = updateTrustedBlock(configFilePath, trustedBlockHeight, trustedBlockHash); err != nil {
return fmt.Errorf("failed to set trusted block wih block_height %v and block_hash %v: %w", trustedBlockHeight, trustedBlockHash, err)
return fmt.Errorf("failed to set trusted block with block_height %v and block_hash %v: %w", trustedBlockHeight, trustedBlockHash, err)
}
fmt.Printf("Successfully set the statesync.trust_height with value %v and statesync.trust_hash with value %v", trustedBlockHeight, trustedBlockHash)
return nil
Expand Down
2 changes: 1 addition & 1 deletion inference-chain/x/inference/keeper/bridge_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (k Keeper) ReleaseFromEscrow(ctx sdk.Context, toAddr sdk.AccAddress, amount

// IsBridgeContractAddress checks if the given contract address matches any registered bridge addresses for the specific chain
func (k Keeper) IsBridgeContractAddress(ctx context.Context, chainId, contractAddress string) bool {
// Set already forces toLower, so we can directy index
// Set already forces toLower, so we can directly index
normalizedInput := strings.ToLower(contractAddress)

has, err := k.BridgeContractAddresses.Has(ctx, collections.Join(chainId, normalizedInput))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestSetBridgeTransaction_StripsAndSyncsValidators(t *testing.T) {
require.True(t, found)
require.ElementsMatch(t, []string{"valA", "valB", "valC"}, got.Validators)

// Delete every KeySet entry and verify Get's Validators is now empty.
// Delete every KeySet entry and verify Gets Validators is now empty.
// If Validators had been stored inline in the base, deleting the
// KeySet wouldn't clear them — catching a regression that leaves
// inline entries behind.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (k Keeper) GetSummaryLastNEpochsByDeveloper(ctx context.Context, developerA
if val := byTimeStore.Get(timeKey); val != nil {
err := k.cdc.Unmarshal(val, &statsByTime)
if err != nil {
k.LogError("unabled to unmarhsal DeveloperStatsByTime", types.Participants, "key", iterator.Key(), "error", err)
k.LogError("unable to unmarshal DeveloperStatsByTime", types.Participants, "key", iterator.Key(), "error", err)
continue
}
summary.TokensUsed += int64(statsByTime.Inference.TotalTokenCount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func (k msgServer) inferenceIsBeforeClaimsSet(ctx context.Context, inference typ
// This would be before IsStartOfPocStage
return true, "Validation during inference epoch"
}
// Somewhere inbetween StartOfPocStage and SetNewValidatorsStage
// Somewhere in between StartOfPocStage and SetNewValidatorsStage
// ActiveParticipants are set during EndOfPoCValidationStage, which is also when we set claims
_, found = k.GetActiveParticipants(ctx, upcomingEpoch.Index)
if found {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (k Keeper) CheckPoCMessageTooLate(ctx sdk.Context, startBlockHeight int64,

if startBlockHeight > currentBlockHeight {
// It may filter legit transaction if the node is behind (node lag / state sync),
// But hope that it will be propogated by other nodes
// But hope that it will be propagated by other nodes
// TODO: In the next release, skip the filter on CheckTx, and enforce only on DeliverTx.
k.Logger().Debug(
"[ValidatePocPeriod] POC submission is too early",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewMsgRegisterModel(authority string, proposedBy string, id string, unitsOf
func (msg *MsgRegisterModel) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Authority)
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authrority address (%s)", err)
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err)
}
_, err = sdk.AccAddressFromBech32(msg.ProposedBy)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion testermint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,5 @@ From this point on, you will gain a lot of additional functionality when opening
- Most Log lines are tagged with `subsystem=` identifiers
- Example: `subsystem=Stages` shows all epoch transition logs
- Find subsystem definitions in: `inference-chain/x/inference/types/logging.go`
You can also use the consts in `logging.go` to see exactly where specific subsytems are used.
You can also use the consts in `logging.go` to see exactly where specific subsystems are used.
---
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Subsystem is especially useful. It represents the specific subsystem inside of t
- Nodes - related to updating ML nodes for an API
- Config - related to updating or retrieving config values
- EventProcessing - related to processing events coming from the chain to the API
- Upgrades - related to upgrading components of the systen
- Upgrades - related to upgrading components of the system
- Server - related to the API server (requests, responses, etc)
- Training - related to AI training
- Stages - related to moving between stages of an Epoch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ a problem with config or bad state. But if it's in the test itself, the errors c
unexpected problem such as an exception or an assertion failure, as well as many other issues.

**HOWEVER**: There are usually a few errors expected here and there, especially when any part of the system
is rebooted or reinitialized. Additionally, Upgrade tests will have several errors in them regarging
is rebooted or reinitialized. Additionally, Upgrade tests will have several errors in them regarding
missing upgrade code, which is what TRIGGERS the upgrade.
### Known Errors: (ignore)
#### Related to restarting the chain:
Expand Down
2 changes: 1 addition & 1 deletion testermint/src/main/kotlin/DockerGroup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ fun initCluster(
Logger.error(e, "Failed to initialize cluster, rebooting")
throw e
}
Logger.error(e, "Error initializing cluser, retrying")
Logger.error(e, "Error initializing cluster, retrying")
logSection("Exception during cluster initialization, retrying")
return initCluster(joinCount, finalConfig, reboot = true)
}
Expand Down
2 changes: 1 addition & 1 deletion testermint/src/test/kotlin/CollateralTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CollateralTests : TestermintTest() {
participant.withdrawCollateral(depositAmount)
participant.node.waitForNextBlock(2)

logSection("Verifying withdrawl")
logSection("Verifying withdrawal")
val activeCollateral = participant.queryCollateral(participantAddress)
assertThat(activeCollateral.amount).isNull()
val balanceAfterWithdraw = participant.getBalance(participantAddress)
Expand Down
2 changes: 1 addition & 1 deletion testermint/src/test/kotlin/StreamVestingTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class StreamVestingTests : TestermintTest() {
logHighlight("Total aggregated vesting amount: $aggregatedTotalAmount ngonka")

// The aggregated amount should be greater than a single reward
// TODO: unfortunatelly, it's not true, because we can't guarantee that the rewards are equal each time to the same validator
// TODO: unfortunately, it's not true, because we can't guarantee that the rewards are equal each time to the same validator
// assertThat(aggregatedTotalAmount).isGreaterThan(totalVestingAmount)

logSection("=== LEGACY REWARD SYSTEM VESTING TEST COMPLETED ===")
Expand Down