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

[TRA-169] keep existing vault orders if price and size don't need updates #1886

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

tqin7
Copy link
Contributor

@tqin7 tqin7 commented Jul 10, 2024

Changelist

this behavior is achieved by introducing a new store:

most recent client IDs: vaultId -> client IDs of most recently placed orders by a vault
  • this is necessary because if we don't place/cancel each block, we no longer can deterministically calculate the IDs
    of the most recently placed orders (previously, we just calculate this with last block's height)

also set order expiration to be 60s into the future as a vault wants its order to stay as long as possible until an update is needed.

Test Plan

unit / integration tests
localnet testing

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If the PR has breaking postgres changes to the indexer add the indexer-postgres-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Summary by CodeRabbit

  • New Features
    • Added functionality to store and retrieve the most recent client IDs for vaults.
    • Updated order expiration parameter to 60 seconds.
  • Bug Fixes
    • Improved order management logic for vaults.
  • Tests
    • Added comprehensive tests for new client ID and order management features.
  • Refactor
    • Refactored initialization logic and import statements for better efficiency.

Copy link

linear bot commented Jul 10, 2024

@tqin7 tqin7 changed the title keep existing vault orders if price and size don't need updates [TRA-169] keep existing vault orders if price and size don't need updates Jul 10, 2024
Copy link
Contributor

coderabbitai bot commented Jul 10, 2024

Walkthrough

The changes introduce a new field mostRecentClientIds to the Vault and VaultSDKType interfaces, update encoding/decoding functions, reorder arguments in the New() function, expand byte conversion utilities, adjust order expiration settings, and add new test cases and functions to manage vault CLOB orders and client IDs. Overall, these updates enhance the functionality and maintainability of the vault system and associated modules.

Changes

File(s) Change Summary
indexer/.../genesis.ts, proto/.../genesis.proto Added a new field mostRecentClientIds to Vault interfaces and updated related functions.
protocol/app/app.go Reordered arguments in the New() function.
protocol/lib/bytes.go, protocol/lib/bytes_test.go Added functions for converting uint32 arrays to byte slices and vice versa, along with corresponding tests.
protocol/scripts/genesis/sample_pregenesis.json, protocol/testutil/constants/genesis.go, protocol/x/vault/types/params.go Changed order_expiration_seconds from 2 to 60.
protocol/x/vault/genesis.go Updated InitGenesis to set most recent client IDs.
protocol/x/vault/keeper/orders.go, protocol/x/vault/types/orders.go, protocol/x/vault/types/vault_id.go Modified functions to manage vault CLOB orders and client IDs.
protocol/x/vault/keeper/orders_test.go, protocol/x/vault/types/orders_test.go Added and updated tests for vault order management and client IDs.
protocol/x/vault/keeper/vault.go Updated GetAllVaults to include MostRecentClientIds.
protocol/x/vault/types/keys.go Added MostRecentClientIdsKeyPrefix constant.

Poem

In the vault where numbers rest,
New IDs join the quest.
Orders linger longer here,
Sixty seconds, never fear.
Bytes to uints, they convert,
Tests ensure they never hurt.
In the code, where changes flow,
Vaults and clients grow and grow.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

clobmoduletypes.ModuleName,
sendingmoduletypes.ModuleName,
vestmoduletypes.ModuleName,
rewardsmoduletypes.ModuleName,
epochsmoduletypes.ModuleName,
govplusmoduletypes.ModuleName,
delaymsgmoduletypes.ModuleName,
vaultmoduletypes.ModuleName,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

previously, vault endblocker was moved to be in front of clob to cancel orders before they expire to avoid flickering (as order expiration was set to be a very small value). With this PR, moving vault endblocker back as order expiration is significantly increased

Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the endblocker for the vault module need to be moved back?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if vault endblocker is before clob's:
let's say an order is due for expiration, vault endblocker will run and see that the order still exists (thus don't do anything if price / size don't need updates), then clob endblocker will remove expired order. Then there's no order anymore until the next block's endblocker

Copy link
Contributor

Choose a reason for hiding this comment

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

Note this behavior in a comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1eea257 and 632533d.

Files ignored due to path filters (1)
  • protocol/x/vault/types/genesis.pb.go is excluded by !**/*.pb.go
Files selected for processing (14)
  • indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/genesis.ts (6 hunks)
  • proto/dydxprotocol/vault/genesis.proto (1 hunks)
  • protocol/app/app.go (1 hunks)
  • protocol/lib/bytes.go (2 hunks)
  • protocol/lib/bytes_test.go (1 hunks)
  • protocol/x/vault/genesis.go (1 hunks)
  • protocol/x/vault/keeper/orders.go (4 hunks)
  • protocol/x/vault/keeper/orders_test.go (12 hunks)
  • protocol/x/vault/keeper/vault.go (1 hunks)
  • protocol/x/vault/types/keys.go (1 hunks)
  • protocol/x/vault/types/orders.go (1 hunks)
  • protocol/x/vault/types/orders_test.go (1 hunks)
  • protocol/x/vault/types/params.go (1 hunks)
  • protocol/x/vault/types/vault_id.go (2 hunks)
Files skipped from review due to trivial changes (1)
  • protocol/x/vault/types/keys.go
Additional comments not posted (38)
protocol/x/vault/types/orders.go (1)

7-19: LGTM! Verify correctness with additional unit tests.

The function correctly calculates the CLOB order client ID by combining the order side and layer into a 32-bit integer. Ensure thorough testing to verify correctness.

protocol/lib/bytes.go (2)

18-25: LGTM! Verify correctness with additional unit tests.

The function correctly converts a slice of uint32 to a byte slice. Ensure thorough testing to verify correctness.


27-34: LGTM! Verify correctness with additional unit tests.

The function correctly converts a byte slice to a slice of uint32. Ensure thorough testing to verify correctness.

proto/dydxprotocol/vault/genesis.proto (1)

28-29: LGTM! Verify handling of the new field in other parts of the code.

The new field most_recent_client_ids correctly stores the client IDs of the most recently placed orders. Ensure thorough testing to verify the handling of this field in other parts of the code.

protocol/x/vault/genesis.go (1)

36-36: LGTM! Verify implementation and testing of SetMostRecentClientIds.

The updates to the InitGenesis function correctly set the most recent client IDs for each vault. Ensure thorough testing to verify the implementation and testing of the SetMostRecentClientIds function.

protocol/x/vault/types/params.go (1)

17-17: LGTM! Verify the impact of increasing OrderExpirationSeconds.

The change from 2 to 10 seconds looks good. Ensure this change does not negatively impact other parts of the codebase.

protocol/lib/bytes_test.go (2)

28-57: Good test coverage for Uint32ArrayToBytes.

The test cases cover a range of scenarios, including edge cases.


59-88: Good test coverage for BytesToUint32Array.

The test cases cover a range of scenarios, including edge cases.

protocol/x/vault/types/orders_test.go (1)

12-87: Good test coverage for GetVaultClobOrderClientId.

The test cases cover a range of scenarios, including various combinations of side and layer.

protocol/x/vault/types/vault_id.go (1)

74-82: Function GetClobOrderId looks good.

The function implementation looks correct and follows best practices.

protocol/x/vault/keeper/vault.go (2)

144-145: Include fetching most recent client IDs for vaults.

The addition correctly fetches the most recent client IDs for vaults.


151-151: LGTM! But verify the function usage in the codebase.

The code changes are approved.

However, ensure that all function calls to GetAllVaults correctly handle the MostRecentClientIds field.

Verification successful

Verification Successful: Handling of MostRecentClientIds Field

The MostRecentClientIds field is correctly handled in the InitGenesis function when GetAllVaults is used to set genesis.Vaults.

  • protocol/x/vault/genesis.go:
    • Line 36: k.SetMostRecentClientIds(ctx, *vault.VaultId, vault.MostRecentClientIds)
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `GetAllVaults` correctly handle the `MostRecentClientIds` field.

# Test: Search for the function usage. Expect: Ensure the new field is handled properly in all occurrences.
rg --type go -A 5 $'GetAllVaults'

Length of output: 948


Script:

#!/bin/bash
# Extract relevant code around the usage of GetAllVaults in protocol/x/vault/genesis.go to verify handling of MostRecentClientIds.
rg --type go -A 10 -B 10 'k.GetAllVaults(ctx)' protocol/x/vault/genesis.go

Length of output: 76


Script:

#!/bin/bash
# Extract a larger context around the usage of GetAllVaults in protocol/x/vault/genesis.go to verify handling of MostRecentClientIds.
rg --type go -A 20 -B 20 'k.GetAllVaults(ctx)' protocol/x/vault/genesis.go

# Search for the usage of genesis.Vaults to verify how the returned vault objects are handled.
rg --type go 'genesis.Vaults' protocol/x/vault/genesis.go

Length of output: 172


Script:

#!/bin/bash
# Extract the entire InitGenesis function from protocol/x/vault/genesis.go to verify handling of genesis.Vaults.
ast-grep --lang go --pattern 'func InitGenesis($_, $_, $_) $_' protocol/x/vault/genesis.go

Length of output: 1936

indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/genesis.ts (4)

37-39: Add mostRecentClientIds field to Vault interface.

The addition correctly introduces the new field.


55-57: Add most_recent_client_ids field to VaultSDKType interface.

The addition correctly introduces the new field.


120-121: Initialize mostRecentClientIds in createBaseVault function.

The addition correctly initializes the new field.


143-149: Encode mostRecentClientIds in Vault.encode function.

The addition correctly encodes the new field.

protocol/x/vault/keeper/orders.go (7)

77-79: Include fetching most recent client IDs in RefreshVaultClobOrders.

The addition correctly fetches the most recent client IDs.


86-110: Include setting most recent client IDs in RefreshVaultClobOrders.

The addition correctly sets the most recent client IDs.


386-401: Add internalPlaceVaultClobOrder function.

The new function correctly places a vault CLOB order internally.


404-425: Update PlaceVaultClobOrder to call internalPlaceVaultClobOrder.

The update correctly calls the new function to place a vault CLOB order.


427-467: Add ReplaceVaultClobOrder function.

The new function correctly replaces a vault CLOB order.


469-480: Add GetMostRecentClientIds function.

The new function correctly retrieves the most recent client IDs for a vault.


482-489: Add SetMostRecentClientIds function.

The new function correctly sets the most recent client IDs for a vault.

protocol/x/vault/keeper/orders_test.go (14)

6-6: Add missing import for time.

The import statement for time is added correctly.


16-16: Add missing import for testtx.

The import statement for testtx is added correctly.


122-125: Initialize the test application correctly.

The initialization of the test application with the given options is done correctly.


Line range hint 175-200:
Verify the correct placement of expected orders and indexer events.

The code correctly checks the expected orders and indexer events. Ensure that the logic for appending orders and events is correct.


205-207: Check the final assertions for stateful orders and indexer events.

The final assertions for stateful orders and indexer events are correctly implemented.


225-227: Define test case for refreshing orders from Vault for Clob Pair 1.

The test case for refreshing orders from Vault for Clob Pair 1 is correctly defined.


239-243: Initialize the test application correctly.

The initialization of the test application with the given options is done correctly.


295-307: Verify the initial orders and no order refresh logic.

The code correctly verifies the initial orders and ensures that no order refresh occurs without price updates.


309-337: Verify the order replacement logic with price updates.

The code correctly verifies the order replacement logic when price updates occur. Ensure that the logic for advancing the block and updating market prices is correct.


339-349: Verify the order placement logic after order expiration.

The code correctly verifies the order placement logic after the orders expire.


831-831: Use vaulttypes.GetVaultClobOrderClientId for generating client IDs.

The function vaulttypes.GetVaultClobOrderClientId is correctly used for generating client IDs.


925-931: Use vaulttypes.GetVaultClobOrderClientId for generating client IDs.

The function vaulttypes.GetVaultClobOrderClientId is correctly used for generating client IDs.


925-931: Use vaulttypes.GetVaultClobOrderClientId for generating client IDs.

The function vaulttypes.GetVaultClobOrderClientId is correctly used for generating client IDs.


950-974: Test the functionality of setting and getting the most recent client IDs.

The test cases correctly verify the functionality of setting and getting the most recent client IDs.

protocol/app/app.go (1)

1298-1298: LGTM! The change in argument order is approved.

The change in the order of arguments does not affect the logic or correctness of the code.

@@ -72,78 +73,46 @@ func (k Keeper) RefreshAllVaultOrders(ctx sdk.Context) {
}

// RefreshVaultClobOrders refreshes orders of a CLOB vault.
// Note: Order IDs are deterministically constructed based on layer and side. An order ID has its
// last bit flipped only upon order replacement.
func (k Keeper) RefreshVaultClobOrders(ctx sdk.Context, vaultId types.VaultId) (err error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

main logic change is in this function

},
)
newOrders = tApp.App.ClobKeeper.GetAllStatefulOrders(ctx)
require.Len(t, newOrders, int(params.Layers*2))
Copy link
Contributor

Choose a reason for hiding this comment

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

Check that client IDs are different from before?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or check that the expiration timestamps on the orders are updated.

@chenyaoy
Copy link
Contributor

What happens when existing vault orders are filled or partially filled? Does the new order quantums change from the old order's quantums and trigger a replacement order?

@tqin7
Copy link
Contributor Author

tqin7 commented Jul 10, 2024

What happens when existing vault orders are filled or partially filled? Does the new order quantums change from the old order's quantums and trigger a replacement order?

Yep. Replacement happens when price / size changes

Comment on lines -134 to -144
k.GetIndexerEventManager().AddTxnEvent(
ctx,
indexerevents.SubtypeStatefulOrder,
indexerevents.StatefulOrderEventVersion,
indexer_manager.GetBytes(
indexerevents.NewLongTermOrderReplacementEvent(
*replacedOrderId,
*order,
),
),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

note: For expired orders, this breaks the order flickering logic since orders will have the expire + place events sent for them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct. seems okay to me as expiration occurs much less frequently than before.

however, one thing we can do might be to replace order (send replacement event) here (i.e. replace order if order gets filled or expires)

tApp.App.ClobKeeper.GetAllStatefulOrders(ctx),
)

// Advance to next block with price updates and vault should replace its old orders with new ones.
Copy link
Contributor

Choose a reason for hiding this comment

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

Update test with case for filled orders / change in quantums.

blockHeight int64
// layer.
layer uint8
func TestGetSetMostRecentClientIds(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Prefer testcase organization for this test rather than commented cases.

}
clientIds[i] = orderToPlace.OrderId.ClientId
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Make it explicit that if the order is not replaced oldClientId is what' stored into the clientIds.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 632533d and 8a15234.

Files ignored due to path filters (1)
  • protocol/x/vault/types/genesis.pb.go is excluded by !**/*.pb.go
Files selected for processing (17)
  • indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/genesis.ts (6 hunks)
  • proto/dydxprotocol/vault/genesis.proto (1 hunks)
  • protocol/app/app.go (1 hunks)
  • protocol/app/testdata/default_genesis_state.json (1 hunks)
  • protocol/lib/bytes.go (2 hunks)
  • protocol/lib/bytes_test.go (1 hunks)
  • protocol/scripts/genesis/sample_pregenesis.json (1 hunks)
  • protocol/testutil/constants/genesis.go (1 hunks)
  • protocol/x/vault/genesis.go (1 hunks)
  • protocol/x/vault/keeper/orders.go (4 hunks)
  • protocol/x/vault/keeper/orders_test.go (12 hunks)
  • protocol/x/vault/keeper/vault.go (1 hunks)
  • protocol/x/vault/types/keys.go (1 hunks)
  • protocol/x/vault/types/orders.go (1 hunks)
  • protocol/x/vault/types/orders_test.go (1 hunks)
  • protocol/x/vault/types/params.go (1 hunks)
  • protocol/x/vault/types/vault_id.go (2 hunks)
Files skipped from review due to trivial changes (1)
  • protocol/testutil/constants/genesis.go
Files skipped from review as they are similar to previous changes (11)
  • indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/genesis.ts
  • proto/dydxprotocol/vault/genesis.proto
  • protocol/app/app.go
  • protocol/lib/bytes.go
  • protocol/x/vault/keeper/orders.go
  • protocol/x/vault/keeper/orders_test.go
  • protocol/x/vault/keeper/vault.go
  • protocol/x/vault/types/orders.go
  • protocol/x/vault/types/orders_test.go
  • protocol/x/vault/types/params.go
  • protocol/x/vault/types/vault_id.go
Additional comments not posted (6)
protocol/x/vault/types/keys.go (1)

30-32: Addition of MostRecentClientIdsKeyPrefix

The new key prefix MostRecentClientIdsKeyPrefix is added to store the most recent client IDs for vaults. The documentation comment is clear and follows the existing conventions.

protocol/x/vault/genesis.go (1)

36-36: Setting Most Recent Client IDs in InitGenesis

The addition of k.SetMostRecentClientIds(ctx, *vault.VaultId, vault.MostRecentClientIds) in the InitGenesis function is appropriate. It ensures that the most recent client IDs are set during the genesis initialization. Error handling is consistent with the rest of the code.

protocol/lib/bytes_test.go (2)

28-57: Comprehensive Test for Uint32ArrayToBytes

The TestUint32ArrayToBytes function is comprehensive and covers various edge cases, including maximum and minimum values. The test cases are well-structured and follow the existing testing conventions.


59-88: Comprehensive Test for BytesToUint32Array

The TestBytesToUint32Array function is comprehensive and covers various edge cases, including maximum and minimum values. The test cases are well-structured and follow the existing testing conventions.

protocol/app/testdata/default_genesis_state.json (1)

475-475: Update of order_expiration_seconds Parameter

The order_expiration_seconds parameter is updated from 2 to 60. This change is consistent with the PR objective to allow orders to stay longer before an update is needed.

protocol/scripts/genesis/sample_pregenesis.json (1)

1823-1823: Update order_expiration_seconds to 60 seconds.

The order_expiration_seconds parameter has been updated to 60 to allow orders to stay as long as possible until an update is needed. This change aligns with the PR summary and the intended behavior described.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8a15234 and 9dccaa3.

Files selected for processing (1)
  • protocol/x/vault/keeper/orders_test.go (12 hunks)
Files skipped from review as they are similar to previous changes (1)
  • protocol/x/vault/keeper/orders_test.go

}
}

// Vault should place its initial orders.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Add a check after each block that mostRecentClientIds of the vault is the same as all the stateful orders.

)
}

// Advance to next block where vault should replace its orders to update their sizes.
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking: Add TODO for filled stateful vault order testing if possible.

initialOrders := tApp.App.ClobKeeper.GetAllStatefulOrders(ctx)
require.Len(t, initialOrders, int(params.Layers*2))

// Advance to next block with no price updates / order matches and vault should not refresh its orders.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Advance a few more blocks while checking that orders do not get refreshed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9dccaa3 and d334726.

Files selected for processing (1)
  • protocol/x/vault/keeper/orders_test.go (12 hunks)
Files skipped from review as they are similar to previous changes (1)
  • protocol/x/vault/keeper/orders_test.go

@tqin7 tqin7 merged commit 8ff1dda into main Jul 11, 2024
33 checks passed
@tqin7 tqin7 deleted the tq/tra-169 branch July 11, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants