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

DUMMY PR: Show pinning storage slot fixes issue in #6254 #6416

Closed
wants to merge 47 commits into from

Conversation

kayagokalp
Copy link
Member

Description

vaivaswatha and others added 30 commits August 13, 2024 12:12
With the target contract broken down into chunks (with
sizes that are word aligned), we can load it in pieces
and then execute.
Bumps dependencies so that we start to use fuel-core v0.31.0.

Waiting on:

1. FuelLabs/forc-wallet#197
2. FuelLabs/forc-wallet#196

---------

Co-authored-by: Igor Rončević <ironcev@hotmail.com>
… `[proxy]` enabled (#6069)

Part of #6068.

This PR adds couple of things:

1. A default proxy contract implementation taken from [sway
standards](https://github.com/FuelLabs/sway-standards/blob/master/standards/src/src14.sw).
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

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:

```TOML
[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](https://github.com/FuelLabs/sway-standard-implementations/tree/61fd4ad8f69d21cec0d5cd8135bdc4495e0c125c). 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:

```TOML
[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 contract abi and bins are stored at
`~/.forc/.generated_proxy_contracts/project_name` for housekeeping.
Added error ABIHashCollision error.
The flag json_abi_with_callpaths was removed because its is now supported
by the SDKs and because not using it is unsafe, as names can collide.
Copy link

Benchmark for 349a2b4

Click to view benchmark
Test Base PR %
code_action 5.0±0.11ms 5.2±0.03ms +4.00%
code_lens 284.6±8.34ns 339.8±9.10ns +19.40%
compile 2.6±0.04s 2.6±0.04s 0.00%
completion 4.5±0.07ms 4.7±0.14ms +4.44%
did_change_with_caching 2.6±0.03s 2.6±0.03s 0.00%
document_symbol 901.9±41.23µs 952.4±26.60µs +5.60%
format 83.4±0.74ms 68.8±0.78ms -17.51%
goto_definition 336.0±5.06µs 335.5±7.13µs -0.15%
highlight 8.7±0.32ms 9.0±0.15ms +3.45%
hover 488.1±3.72µs 496.4±5.99µs +1.70%
idents_at_position 121.5±0.39µs 118.9±0.66µs -2.14%
inlay_hints 627.0±26.93µs 641.3±21.59µs +2.28%
on_enter 2.0±0.04µs 1882.1±41.76ns -5.89%
parent_decl_at_position 3.5±0.04ms 3.7±0.02ms +5.71%
prepare_rename 335.5±7.42µs 337.3±5.89µs +0.54%
rename 8.9±0.14ms 9.2±0.04ms +3.37%
semantic_tokens 1216.7±13.40µs 1289.7±17.35µs +6.00%
token_at_position 328.1±3.42µs 334.9±2.54µs +2.07%
tokens_at_position 3.5±0.07ms 3.7±0.04ms +5.71%
tokens_for_file 396.2±2.58µs 408.9±3.44µs +3.21%
traverse 36.8±0.52ms 37.5±0.93ms +1.90%

@kayagokalp kayagokalp closed this Aug 19, 2024
@kayagokalp kayagokalp deleted the kayagokalp/fix-demonstrate branch August 19, 2024 02:50
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