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: create and deploy a reference proxy contract for contracts with [proxy] enabled #6069

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kayagokalp
Copy link
Member

@kayagokalp kayagokalp commented May 28, 2024

Description

Part of #6068.

This PR adds couple of things:

  1. A default proxy contract implementation taken from sway standards.
  2. Infra for creating, building and deploying the reference implementation for proxy contracts.
  3. Deployment procedure such that proxy contract is deployed while working on a contract which enables the [proxy] in its forc.toml. In a way that it is owned by the deployer and the target initially points to implementation contract.
  4. Infra for making a contract call into the already deployed proxy contracts to update their targets.
  5. Adds a Building text to the all forc build invocations to better inform the user about what forc is doing behind the scenes.
  6. Removes duplicate forc-wallet password prompts which was very frustrating for the users. Now forc-wallet deployment path only asks for password once.
  7. Refactors around how secret_key is selected based on user input
  8. Updated docs around forc-client
  9. Docs around how to use the proxy feature

How this works

If the user does not have a proxy table in their forc.toml, nothing changes, same old deployment procedure is followed. Only difference is that this PR improves the ux by removing the need of providing the password multiple times.

If the user has a contract with a proxy table but without an address like:

[project]
authors = ["kaya"]
entry = "main.sw"
license = "Apache-2.0"
name = "impl-contract"

[dependencies]

[proxy]
enabled = true

Forc automatically creates a proxy contract based on the reference implementation at SRC14. Sets its target to the implementation contract, whichever contract enabled the proxy and the owner to the deployer (signing account of the transaction).

If the user has a contract with a proxy table and an address specified like:

[project]
authors = ["kaya"]
entry = "main.sw"
license = "Apache-2.0"
name = "impl-contract"

[dependencies]

[proxy]
enabled = true
address = "........."

Forc automatically makes a set target conract call to update the proxy contract's target. Pointing it to the newly deployed impl contract which defines the proxy table.

Generated proxy contracts are stored at ~/.forc/.generated_proxy_contracts/project_name for housekeeping.

@kayagokalp kayagokalp added enhancement New feature or request big this task is hard and will take a while P: critical Should be looked at before anything else forc-client Everything related to the `forc-client` crate. forc-deploy Everything to do with forc-deploy labels May 28, 2024
@kayagokalp kayagokalp self-assigned this May 28, 2024
Copy link

Benchmark for 946beec

Click to view benchmark
Test Base PR %
code_action 5.4±0.08ms 5.6±0.09ms +3.70%
code_lens 293.0±13.95ns 293.8±7.41ns +0.27%
compile 3.1±0.06s 3.2±0.04s +3.23%
completion 4.9±0.16ms 4.8±0.08ms -2.04%
did_change_with_caching 3.0±0.04s 3.0±0.07s 0.00%
document_symbol 958.8±26.32µs 971.8±20.63µs +1.36%
format 76.0±0.96ms 74.6±1.08ms -1.84%
goto_definition 368.0±6.55µs 373.1±7.31µs +1.39%
highlight 9.1±0.05ms 9.2±0.11ms +1.10%
hover 493.4±8.98µs 500.5±8.27µs +1.44%
idents_at_position 122.6±0.49µs 123.1±1.51µs +0.41%
inlay_hints 667.5±19.60µs 668.1±8.53µs +0.09%
on_enter 465.3±9.95ns 467.2±20.48ns +0.41%
parent_decl_at_position 3.8±0.05ms 3.8±0.03ms 0.00%
prepare_rename 368.3±5.98µs 371.7±8.25µs +0.92%
rename 9.8±0.17ms 9.8±0.15ms 0.00%
semantic_tokens 977.9±43.61µs 955.9±21.75µs -2.25%
token_at_position 359.7±3.69µs 359.9±2.89µs +0.06%
tokens_at_position 3.8±0.04ms 3.8±0.08ms 0.00%
tokens_for_file 417.7±2.07µs 434.2±4.37µs +3.95%
traverse 42.4±1.16ms 41.5±1.31ms -2.12%

Copy link

Benchmark for 52d495e

Click to view benchmark
Test Base PR %
code_action 5.9±0.09ms 5.2±0.09ms -11.86%
code_lens 288.2±7.07ns 336.9±20.68ns +16.90%
compile 3.3±0.07s 3.1±0.06s -6.06%
completion 5.2±0.13ms 4.6±0.11ms -11.54%
did_change_with_caching 3.2±0.07s 3.2±0.04s 0.00%
document_symbol 979.3±20.40µs 1016.6±39.59µs +3.81%
format 75.6±0.68ms 73.9±1.17ms -2.25%
goto_definition 365.5±6.80µs 362.6±5.96µs -0.79%
highlight 9.5±0.16ms 8.7±0.05ms -8.42%
hover 491.9±8.59µs 487.2±6.58µs -0.96%
idents_at_position 122.0±0.50µs 124.3±0.61µs +1.89%
inlay_hints 656.9±38.17µs 649.2±23.86µs -1.17%
on_enter 487.8±15.12ns 461.1±15.57ns -5.47%
parent_decl_at_position 4.0±0.09ms 3.6±0.06ms -10.00%
prepare_rename 366.2±10.83µs 362.3±6.63µs -1.06%
rename 10.1±0.26ms 9.3±0.16ms -7.92%
semantic_tokens 973.5±11.84µs 987.9±31.67µs +1.48%
token_at_position 354.5±1.86µs 356.1±2.36µs +0.45%
tokens_at_position 4.0±0.13ms 3.6±0.04ms -10.00%
tokens_for_file 416.3±1.88µs 418.4±2.03µs +0.50%
traverse 43.3±1.39ms 44.0±1.51ms +1.62%

Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

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

Looking good! Left a few initial comments/questions

forc-plugins/forc-client/src/util/proxy_contract-abi.json Outdated Show resolved Hide resolved
forc-plugins/forc-client/src/util/pkg.rs Outdated Show resolved Hide resolved
forc-plugins/forc-client/src/util/pkg.rs Show resolved Hide resolved
forc-plugins/forc-client/src/op/deploy.rs Outdated Show resolved Hide resolved
Copy link

Benchmark for 6828faa

Click to view benchmark
Test Base PR %
code_action 5.2±0.10ms 5.2±0.09ms 0.00%
code_lens 289.6±10.50ns 333.3±9.93ns +15.09%
compile 3.1±0.04s 3.0±0.05s -3.23%
completion 4.6±0.10ms 4.6±0.08ms 0.00%
did_change_with_caching 2.9±0.02s 2.9±0.05s 0.00%
document_symbol 1031.5±18.02µs 997.1±33.27µs -3.33%
format 73.7±1.29ms 74.5±0.94ms +1.09%
goto_definition 364.5±6.44µs 361.7±8.55µs -0.77%
highlight 8.8±0.13ms 8.7±0.05ms -1.14%
hover 485.8±7.68µs 483.7±5.30µs -0.43%
idents_at_position 124.4±0.20µs 123.9±1.14µs -0.40%
inlay_hints 638.8±18.70µs 651.2±31.08µs +1.94%
on_enter 489.6±33.45ns 464.2±20.28ns -5.19%
parent_decl_at_position 3.6±0.03ms 3.6±0.02ms 0.00%
prepare_rename 359.0±7.57µs 360.2±3.56µs +0.33%
rename 9.4±0.18ms 9.3±0.17ms -1.06%
semantic_tokens 969.0±11.77µs 977.7±10.31µs +0.90%
token_at_position 358.0±2.02µs 358.9±1.97µs +0.25%
tokens_at_position 3.6±0.03ms 3.6±0.03ms 0.00%
tokens_for_file 419.8±2.06µs 423.8±1.52µs +0.95%
traverse 41.9±1.31ms 41.3±0.79ms -1.43%

Copy link

Benchmark for 82fee6f

Click to view benchmark
Test Base PR %
code_action 5.2±0.06ms 5.3±0.03ms +1.92%
code_lens 288.2±9.93ns 335.7±9.82ns +16.48%
compile 3.0±0.02s 3.0±0.05s 0.00%
completion 4.5±0.02ms 4.6±0.02ms +2.22%
did_change_with_caching 2.9±0.04s 2.9±0.04s 0.00%
document_symbol 948.7±22.76µs 950.3±13.68µs +0.17%
format 73.7±1.23ms 73.4±1.16ms -0.41%
goto_definition 363.8±7.73µs 364.9±8.75µs +0.30%
highlight 8.8±0.18ms 8.8±0.09ms 0.00%
hover 488.2±8.73µs 489.5±8.05µs +0.27%
idents_at_position 123.9±0.41µs 123.9±2.55µs 0.00%
inlay_hints 651.6±29.84µs 657.4±26.93µs +0.89%
on_enter 483.4±8.19ns 461.6±17.51ns -4.51%
parent_decl_at_position 3.6±0.04ms 3.6±0.05ms 0.00%
prepare_rename 357.1±5.05µs 365.0±4.40µs +2.21%
rename 9.3±0.18ms 9.3±0.18ms 0.00%
semantic_tokens 971.9±15.01µs 992.1±18.33µs +2.08%
token_at_position 353.1±3.44µs 362.3±7.73µs +2.61%
tokens_at_position 3.6±0.07ms 3.6±0.02ms 0.00%
tokens_for_file 419.0±2.26µs 421.0±2.66µs +0.48%
traverse 41.2±0.54ms 42.1±0.84ms +2.18%

@kayagokalp kayagokalp marked this pull request as ready for review May 29, 2024 22:32
@kayagokalp kayagokalp requested review from sdankel and a team May 29, 2024 22:32
Copy link

Benchmark for 1101331

Click to view benchmark
Test Base PR %
code_action 5.3±0.12ms 5.3±0.12ms 0.00%
code_lens 287.3±4.49ns 333.9±14.18ns +16.22%
compile 3.1±0.06s 3.0±0.06s -3.23%
completion 4.6±0.39ms 4.6±0.09ms 0.00%
did_change_with_caching 3.0±0.06s 2.9±0.02s -3.33%
document_symbol 951.8±30.65µs 989.7±41.43µs +3.98%
format 74.6±0.69ms 73.7±0.77ms -1.21%
goto_definition 361.6±4.20µs 367.2±4.25µs +1.55%
highlight 8.7±0.03ms 8.8±0.19ms +1.15%
hover 489.3±4.76µs 486.9±6.76µs -0.49%
idents_at_position 124.6±0.78µs 124.3±1.16µs -0.24%
inlay_hints 708.3±16.99µs 685.6±28.42µs -3.20%
on_enter 483.6±14.57ns 467.5±16.97ns -3.33%
parent_decl_at_position 3.6±0.05ms 3.6±0.07ms 0.00%
prepare_rename 359.4±5.69µs 364.5±9.30µs +1.42%
rename 9.4±0.10ms 9.3±0.17ms -1.06%
semantic_tokens 975.5±20.21µs 961.2±21.32µs -1.47%
token_at_position 363.5±3.07µs 357.2±2.08µs -1.73%
tokens_at_position 3.6±0.01ms 3.6±0.05ms 0.00%
tokens_for_file 429.3±5.69µs 422.0±2.56µs -1.70%
traverse 42.5±1.01ms 42.5±0.86ms 0.00%

docs/book/src/forc/plugins/forc_client/index.md Outdated Show resolved Hide resolved
docs/book/src/forc/plugins/forc_client/index.md Outdated Show resolved Hide resolved
forc-plugins/forc-client/src/util/pkg.rs Outdated Show resolved Hide resolved
Copy link

Benchmark for c157f2b

Click to view benchmark
Test Base PR %
code_action 5.6±0.18ms 5.3±0.10ms -5.36%
code_lens 335.5±9.43ns 284.7±8.11ns -15.14%
compile 3.2±0.06s 3.2±0.05s 0.00%
completion 4.6±0.13ms 4.7±0.13ms +2.17%
did_change_with_caching 3.1±0.04s 3.0±0.04s -3.23%
document_symbol 1005.0±49.17µs 956.5±22.53µs -4.83%
format 75.0±0.77ms 73.7±0.90ms -1.73%
goto_definition 494.9±3.76µs 361.6±7.21µs -26.93%
highlight 9.0±0.27ms 8.8±0.06ms -2.22%
hover 511.8±11.43µs 489.9±15.58µs -4.28%
idents_at_position 123.4±0.37µs 124.5±1.08µs +0.89%
inlay_hints 650.2±8.69µs 649.9±23.67µs -0.05%
on_enter 478.7±11.97ns 478.4±16.64ns -0.06%
parent_decl_at_position 3.6±0.02ms 3.6±0.04ms 0.00%
prepare_rename 357.0±3.45µs 359.4±6.67µs +0.67%
rename 9.4±0.19ms 9.5±0.25ms +1.06%
semantic_tokens 995.8±20.54µs 988.1±17.90µs -0.77%
token_at_position 353.1±3.42µs 355.9±2.95µs +0.79%
tokens_at_position 3.6±0.03ms 3.6±0.08ms 0.00%
tokens_for_file 425.6±2.75µs 424.5±4.89µs -0.26%
traverse 43.5±1.13ms 42.9±0.92ms -1.38%

@IGI-111 IGI-111 requested review from a team as code owners May 31, 2024 18:41
Copy link

Benchmark for 126ba37

Click to view benchmark
Test Base PR %
code_action 5.5±0.21ms 5.4±0.07ms -1.82%
code_lens 339.9±26.93ns 291.1±16.71ns -14.36%
compile 3.2±0.07s 3.2±0.06s 0.00%
completion 4.7±0.15ms 4.8±0.10ms +2.13%
did_change_with_caching 3.1±0.06s 3.1±0.05s 0.00%
document_symbol 1014.9±40.47µs 980.3±18.46µs -3.41%
format 75.9±0.98ms 75.1±1.53ms -1.05%
goto_definition 368.9±3.50µs 369.1±10.14µs +0.05%
highlight 8.9±0.20ms 8.9±0.07ms 0.00%
hover 497.4±9.43µs 497.6±7.45µs +0.04%
idents_at_position 123.5±1.08µs 123.5±1.06µs 0.00%
inlay_hints 724.3±16.14µs 665.8±36.54µs -8.08%
on_enter 484.2±11.49ns 480.1±15.19ns -0.85%
parent_decl_at_position 3.6±0.04ms 3.6±0.05ms 0.00%
prepare_rename 370.4±9.60µs 368.6±9.76µs -0.49%
rename 9.6±0.22ms 9.8±0.24ms +2.08%
semantic_tokens 1001.1±23.12µs 986.6±20.43µs -1.45%
token_at_position 363.8±2.08µs 362.2±9.01µs -0.44%
tokens_at_position 3.6±0.03ms 3.6±0.08ms 0.00%
tokens_for_file 430.8±3.03µs 428.5±4.93µs -0.53%
traverse 43.7±0.71ms 43.1±1.04ms -1.37%

Copy link
Contributor

@K1-R1 K1-R1 left a comment

Choose a reason for hiding this comment

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

A few suggestions for the docs, but this is a great feature. The auto updating of the proxy address in the manifest is great

docs/book/src/forc/plugins/forc_client/index.md Outdated Show resolved Hide resolved
docs/book/src/forc/plugins/forc_client/index.md Outdated Show resolved Hide resolved
docs/book/src/forc/plugins/forc_client/index.md Outdated Show resolved Hide resolved
docs/book/src/forc/plugins/forc_client/index.md Outdated Show resolved Hide resolved
@K1-R1 K1-R1 requested a review from a team June 3, 2024 16:29
@K1-R1 K1-R1 requested a review from a team June 3, 2024 16:29
@kayagokalp kayagokalp force-pushed the kayagokalp/deploy-default-proxy branch from 5ad5d69 to a29d8a3 Compare June 4, 2024 22:33
@kayagokalp kayagokalp enabled auto-merge (squash) June 4, 2024 22:33
@kayagokalp kayagokalp requested review from sdankel and K1-R1 June 4, 2024 22:35
Copy link

github-actions bot commented Jun 4, 2024

Benchmark for 7d4734a

Click to view benchmark
Test Base PR %
code_action 5.5±0.02ms 5.6±0.12ms +1.82%
code_lens 335.1±9.07ns 291.2±6.53ns -13.10%
compile 4.0±0.08s 4.0±0.06s 0.00%
completion 4.8±0.08ms 4.8±0.10ms 0.00%
did_change_with_caching 3.7±0.05s 3.7±0.07s 0.00%
document_symbol 991.1±45.34µs 1072.6±40.27µs +8.22%
format 74.4±1.02ms 74.1±1.40ms -0.40%
goto_definition 373.1±7.65µs 362.7±5.87µs -2.79%
highlight 9.1±0.16ms 9.1±0.02ms 0.00%
hover 543.9±6.97µs 539.1±6.47µs -0.88%
idents_at_position 125.6±0.26µs 122.0±1.31µs -2.87%
inlay_hints 661.6±28.09µs 663.1±21.25µs +0.23%
on_enter 451.3±10.16ns 476.1±11.42ns +5.50%
parent_decl_at_position 3.7±0.02ms 3.7±0.02ms 0.00%
prepare_rename 375.5±30.69µs 363.9±6.58µs -3.09%
rename 9.7±0.21ms 9.7±0.19ms 0.00%
semantic_tokens 1018.8±15.49µs 971.6±21.01µs -4.63%
token_at_position 370.7±2.37µs 354.1±2.87µs -4.48%
tokens_at_position 3.7±0.04ms 3.7±0.03ms 0.00%
tokens_for_file 424.6±2.83µs 418.1±6.30µs -1.53%
traverse 39.1±1.45ms 38.9±1.15ms -0.51%

K1-R1
K1-R1 previously approved these changes Jun 5, 2024
chore: use defaults from constants

chore: clippy fix

feat: update proxy addres after new deployment of it

refactor: remove duplicate password prompts and cleanup secret key selection

chore: add remove todo comment

feat: actually update proxy target if there is an address in the forc.toml

clippy fix

test: add proxy contract build test

docs: update docs

markdown lint

fix comment typo

docs: add proxy docs

fix docs lints

update docs from review

Co-authored-by: K1-R1 <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>

pin to tag
@kayagokalp
Copy link
Member Author

I had to rebase as there were conflicts.

Copy link

Benchmark for 0a46d9b

Click to view benchmark
Test Base PR %
code_action 5.3±0.10ms 5.3±0.11ms 0.00%
code_lens 292.3±5.21ns 283.2±8.29ns -3.11%
compile 4.1±0.10s 4.1±0.07s 0.00%
completion 4.7±0.13ms 4.7±0.12ms 0.00%
did_change_with_caching 3.7±0.08s 3.7±0.09s 0.00%
document_symbol 948.6±10.73µs 956.1±19.90µs +0.79%
format 72.9±2.50ms 71.6±2.44ms -1.78%
goto_definition 375.5±14.54µs 394.4±7.68µs +5.03%
highlight 8.8±0.31ms 8.8±0.26ms 0.00%
hover 549.7±23.01µs 574.9±6.79µs +4.58%
idents_at_position 123.2±0.39µs 123.1±1.14µs -0.08%
inlay_hints 717.8±23.84µs 702.3±23.16µs -2.16%
on_enter 461.6±6.69ns 510.7±13.83ns +10.64%
parent_decl_at_position 3.6±0.03ms 3.6±0.04ms 0.00%
prepare_rename 363.4±7.05µs 394.2±9.92µs +8.48%
rename 9.6±0.20ms 9.6±0.28ms 0.00%
semantic_tokens 1001.0±62.50µs 969.6±24.62µs -3.14%
token_at_position 360.5±2.21µs 353.7±2.80µs -1.89%
tokens_at_position 3.6±0.05ms 3.6±0.11ms 0.00%
tokens_for_file 424.5±6.20µs 428.4±2.24µs +0.92%
traverse 40.6±1.64ms 40.0±0.68ms -1.48%

Copy link

Benchmark for b441f2e

Click to view benchmark
Test Base PR %
code_action 5.3±0.10ms 5.3±0.12ms 0.00%
code_lens 285.7±7.49ns 288.7±20.50ns +1.05%
compile 4.1±0.06s 4.0±0.07s -2.44%
completion 4.6±0.09ms 4.6±0.13ms 0.00%
did_change_with_caching 3.7±0.08s 3.7±0.11s 0.00%
document_symbol 1003.8±50.30µs 997.0±43.02µs -0.68%
format 71.2±1.26ms 71.2±1.36ms 0.00%
goto_definition 366.3±8.61µs 360.7±7.13µs -1.53%
highlight 8.7±0.02ms 8.8±0.95ms +1.15%
hover 543.0±8.36µs 539.6±18.20µs -0.63%
idents_at_position 124.1±0.18µs 124.9±1.50µs +0.64%
inlay_hints 650.6±28.26µs 653.5±20.46µs +0.45%
on_enter 459.4±9.38ns 472.7±14.16ns +2.90%
parent_decl_at_position 3.6±0.04ms 3.6±0.05ms 0.00%
prepare_rename 365.4±4.87µs 358.1±5.96µs -2.00%
rename 9.4±0.31ms 9.3±0.18ms -1.06%
semantic_tokens 968.6±42.38µs 981.9±31.09µs +1.37%
token_at_position 362.4±3.13µs 357.1±2.36µs -1.46%
tokens_at_position 3.6±0.04ms 3.6±0.03ms 0.00%
tokens_for_file 424.3±2.12µs 420.6±2.34µs -0.87%
traverse 39.9±0.92ms 40.3±0.77ms +1.00%

@K1-R1 K1-R1 requested review from a team June 11, 2024 15:49
Copy link

Benchmark for 4fab154

Click to view benchmark
Test Base PR %
code_action 5.1±0.14ms 5.1±0.05ms 0.00%
code_lens 346.2±10.49ns 339.7±13.37ns -1.88%
compile 3.6±0.14s 3.7±0.08s +2.78%
completion 4.7±0.05ms 4.9±0.14ms +4.26%
did_change_with_caching 3.5±0.06s 3.4±0.10s -2.86%
document_symbol 1010.3±48.37µs 1028.2±28.40µs +1.77%
format 90.3±1.37ms 90.3±1.72ms 0.00%
goto_definition 353.6±7.21µs 354.5±10.82µs +0.25%
highlight 8.7±0.26ms 8.7±0.10ms 0.00%
hover 576.8±6.73µs 580.0±7.62µs +0.55%
idents_at_position 120.2±0.41µs 119.5±1.66µs -0.58%
inlay_hints 644.8±25.71µs 642.3±29.03µs -0.39%
on_enter 457.3±25.42ns 462.8±14.84ns +1.20%
parent_decl_at_position 3.6±0.06ms 3.6±0.06ms 0.00%
prepare_rename 353.6±8.76µs 352.8±6.30µs -0.23%
rename 9.0±0.17ms 9.3±0.15ms +3.33%
semantic_tokens 989.9±16.94µs 972.6±18.22µs -1.75%
token_at_position 431.4±12.64µs 349.8±3.14µs -18.92%
tokens_at_position 3.6±0.05ms 3.7±0.12ms +2.78%
tokens_for_file 413.8±5.44µs 411.1±5.33µs -0.65%
traverse 38.6±0.92ms 38.1±0.94ms -1.30%

Copy link

Benchmark for 7c5e50c

Click to view benchmark
Test Base PR %
code_action 5.1±0.20ms 5.1±0.12ms 0.00%
code_lens 340.2±5.23ns 339.4±10.37ns -0.24%
compile 3.4±0.08s 3.6±0.09s +5.88%
completion 4.6±0.01ms 4.7±0.07ms +2.17%
did_change_with_caching 3.2±0.09s 3.3±0.10s +3.12%
document_symbol 991.1±19.46µs 948.8±34.93µs -4.27%
format 87.8±1.26ms 89.2±0.99ms +1.59%
goto_definition 354.6±6.85µs 360.5±6.36µs +1.66%
highlight 8.7±0.16ms 8.7±0.05ms 0.00%
hover 581.2±5.48µs 581.3±4.90µs +0.02%
idents_at_position 120.5±0.53µs 120.7±1.02µs +0.17%
inlay_hints 653.5±26.11µs 640.3±30.50µs -2.02%
on_enter 467.4±11.02ns 449.1±13.35ns -3.92%
parent_decl_at_position 3.6±0.02ms 3.6±0.09ms 0.00%
prepare_rename 357.6±15.88µs 358.1±10.71µs +0.14%
rename 9.0±0.16ms 8.9±0.10ms -1.11%
semantic_tokens 975.1±27.51µs 978.4±22.46µs +0.34%
token_at_position 344.3±1.82µs 357.1±4.07µs +3.72%
tokens_at_position 3.6±0.04ms 3.6±0.06ms 0.00%
tokens_for_file 411.6±1.45µs 412.2±3.14µs +0.15%
traverse 36.1±0.38ms 37.5±0.64ms +3.88%

@sdankel
Copy link
Member

sdankel commented Jun 11, 2024

I tried this out on test/src/e2e_vm_tests/test_programs/should_pass/forc/contract_dependencies/contract_c/Forc.toml

The first deployment was successful, and the Forc.toml was updated correctly.

The second time I tried deploying, I got this error:

error: provider: io error: Response errors; InsufficientMaxFee { max_fee_from_policies: 0, max_fee_from_gas_price: 326087 }

However, there are sufficient funds in the account. Blocked by FuelLabs/fuels-rs#1396

The other issue is that, for the second request, it's not clear to the user what they are signing. There should be a message like Updating proxy_contract before the user is asked to sign the transaction.

image

@sdankel sdankel disabled auto-merge June 16, 2024 03:28
Copy link

Benchmark for 783259b

Click to view benchmark
Test Base PR %
code_action 5.2±0.08ms 5.2±0.02ms 0.00%
code_lens 339.4±12.61ns 337.3±8.89ns -0.62%
compile 3.5±0.10s 3.5±0.09s 0.00%
completion 4.8±0.10ms 4.8±0.32ms 0.00%
did_change_with_caching 3.3±0.07s 3.3±0.09s 0.00%
document_symbol 990.3±39.60µs 997.8±39.81µs +0.76%
format 89.2±1.41ms 88.8±0.57ms -0.45%
goto_definition 355.1±7.71µs 355.8±7.63µs +0.20%
highlight 9.0±0.18ms 9.0±0.10ms 0.00%
hover 579.6±6.91µs 581.8±5.42µs +0.38%
idents_at_position 119.2±0.40µs 119.9±0.58µs +0.59%
inlay_hints 659.4±20.94µs 651.7±21.31µs -1.17%
on_enter 460.5±9.41ns 451.9±14.45ns -1.87%
parent_decl_at_position 3.7±0.04ms 3.7±0.05ms 0.00%
prepare_rename 354.6±5.68µs 357.9±9.17µs +0.93%
rename 9.2±0.20ms 9.2±0.20ms 0.00%
semantic_tokens 951.9±20.84µs 979.6±20.15µs +2.91%
token_at_position 347.9±1.93µs 345.1±3.35µs -0.80%
tokens_at_position 3.7±0.02ms 3.7±0.04ms 0.00%
tokens_for_file 413.6±1.24µs 407.2±4.39µs -1.55%
traverse 36.9±1.04ms 37.1±0.30ms +0.54%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big this task is hard and will take a while enhancement New feature or request forc-client Everything related to the `forc-client` crate. forc-deploy Everything to do with forc-deploy P: critical Should be looked at before anything else
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants