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

feat: PRT: Block Hash Cache #1623

Closed
wants to merge 74 commits into from
Closed

feat: PRT: Block Hash Cache #1623

wants to merge 74 commits into from

Conversation

shleikes
Copy link
Collaborator

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • read the contribution guide
  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the main branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@ranlavanet ranlavanet self-assigned this Aug 14, 2024
ecosystem/cache/cache_test.go Outdated Show resolved Hide resolved
ecosystem/cache/command.go Outdated Show resolved Hide resolved
ecosystem/cache/handlers.go Show resolved Hide resolved
ecosystem/cache/server.go Outdated Show resolved Hide resolved
protocol/rpcconsumer/rpcconsumer_server.go Show resolved Hide resolved
func (rp *RelayProcessor) GetUserHeaders() []pairingtypes.Metadata {
rp.lock.RLock()
defer rp.lock.RUnlock()
return rp.userReturnHeaders
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove: headers are already inside the replies

@@ -283,8 +363,15 @@ func (rp *RelayProcessor) checkEndProcessing(responsesCount int) bool {
return true
}
}

usedProviders, ok := rp.usedProviders[rp.chainMessage.GetConcatenatedExtensions()]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a mistake, you check responses against the usedProviders object that can change, you need to manage responses for each used providers separately and check them

}
}

var zeroK K
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is done by defining named returned values


if err := decoder.Decode(&proposal); err != nil {
func GetASpec(specIndex, getToTopMostPath string, ctxArg *sdk.Context, keeper *keeper.Keeper) (specRet spectypes.Spec, err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this from testUtils to utils if this is used in production code

@@ -118,7 +124,17 @@ func (cst *ConsumerStateTracker) TxConflictDetection(ctx context.Context, finali
return err
}

func (cst *ConsumerStateTracker) RegisterForSpecUpdates(ctx context.Context, specUpdatable updaters.SpecUpdatable, endpoint lavasession.RPCEndpoint) error {
func (cst *ConsumerStateTracker) RegisterForSpecUpdates(ctx context.Context, specUpdatable updaters.SpecUpdatable, endpoint lavasession.RPCEndpoint, offlineSpecOptions *OfflineSpecOptions) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this, just call setSpec on the updatable instead of calling this function by the caller

@ranlavanet ranlavanet marked this pull request as draft September 8, 2024 14:36
@ranlavanet
Copy link
Collaborator

DEPRECATED AFTER REDESIGN

@ranlavanet ranlavanet closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants