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

[bridge/70] cache the result of get_mutable_bridge_object_arg #17152

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

longbowlu
Copy link
Contributor

Description

instead of querying the bridge arg on chain every time, we do this in the beginning of the program and cache it. If the fetch (with retry) fails, it panics.

Test plan

existing tests


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Apr 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Apr 15, 2024 5:48pm
sui-kiosk ⬜️ Ignored (Inspect) Apr 15, 2024 5:48pm
sui-typescript-docs ⬜️ Ignored (Inspect) Apr 15, 2024 5:48pm

@lxfind
Copy link
Contributor

lxfind commented Apr 15, 2024

Is this a temporary state?
My understanding is that once the bridge objects are created, all these become constants per-chain.
So instead of querying it, it seems that what we should do is to start the bridge with a config that contains these hardcoded information?

@longbowlu
Copy link
Contributor Author

Is this a temporary state? My understanding is that once the bridge objects are created, all these become constants per-chain. So instead of querying it, it seems that what we should do is to start the bridge with a config that contains these hardcoded information?

thought about it and prefer the coded approach because it's extra burden to place right things in the config especially for tests.

Copy link
Contributor

@Bridgerz Bridgerz left a comment

Choose a reason for hiding this comment

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

lgtm

@longbowlu longbowlu merged commit e587b7c into feature/native-bridge Apr 17, 2024
44 checks passed
@longbowlu longbowlu deleted the fb-bridge-70 branch April 17, 2024 22:19
patrickkuo pushed a commit that referenced this pull request May 2, 2024
## Description 

instead of querying the bridge arg on chain every time, we do this in
the beginning of the program and cache it. If the fetch (with retry)
fails, it panics.

## Test plan 

existing tests 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
patrickkuo pushed a commit that referenced this pull request May 8, 2024
## Description 

instead of querying the bridge arg on chain every time, we do this in
the beginning of the program and cache it. If the fetch (with retry)
fails, it panics.

## Test plan 

existing tests 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
patrickkuo pushed a commit that referenced this pull request May 9, 2024
## Description 

instead of querying the bridge arg on chain every time, we do this in
the beginning of the program and cache it. If the fetch (with retry)
fails, it panics.

## Test plan 

existing tests 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
patrickkuo pushed a commit that referenced this pull request May 9, 2024
## Description 

instead of querying the bridge arg on chain every time, we do this in
the beginning of the program and cache it. If the fetch (with retry)
fails, it panics.

## Test plan 

existing tests 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
patrickkuo pushed a commit that referenced this pull request May 9, 2024
## Description 

instead of querying the bridge arg on chain every time, we do this in
the beginning of the program and cache it. If the fetch (with retry)
fails, it panics.

## Test plan 

existing tests 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
patrickkuo pushed a commit that referenced this pull request May 9, 2024
## Description 

instead of querying the bridge arg on chain every time, we do this in
the beginning of the program and cache it. If the fetch (with retry)
fails, it panics.

## Test plan 

existing tests 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants