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

Improve Cadence 1.0 migration #5388

Merged
merged 23 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ba2e543
add support for localnet
turbolent Feb 13, 2024
47f788f
do not update FT switchboard on localnet
turbolent Feb 13, 2024
f1f58e6
update Cadence
turbolent Feb 13, 2024
3e3b847
fix static binary
turbolent Feb 14, 2024
3684bcc
Assert FlowToken.Vault migration in tests
SupunS Feb 14, 2024
513285a
fix burner contract deployment and imports in updated system contracts
turbolent Feb 14, 2024
ae6ceb5
Merge remote-tracking branch 'origin/auto-update-onflow-cadence-v1.0.…
turbolent Feb 14, 2024
c81e215
Merge branch 'feature/stable-cadence' into bastian/cadence-1-migratio…
turbolent Feb 14, 2024
4a88ae3
update Cadence
turbolent Feb 15, 2024
7fa4b7d
add TODO
turbolent Feb 15, 2024
5f79437
remove unused/unnecessary GetOrLoadProgramFunc field
turbolent Feb 15, 2024
99af973
update to latest fixed Cadence
turbolent Feb 15, 2024
7e09edd
generate contract map from all payloads instead of full payload snapshot
turbolent Feb 15, 2024
5e8b0d9
update Cadence
turbolent Feb 16, 2024
c19d5b4
test contract update for missing contract is rejected
turbolent Feb 16, 2024
1dbb4bf
only report program loading errors once, omit full message for subseq…
turbolent Feb 16, 2024
4faf9bf
go mod tidy
turbolent Feb 16, 2024
ae39304
share error message handling, cache program loading errors
turbolent Feb 16, 2024
4198bc7
remove log statements
turbolent Feb 17, 2024
97b6f10
Merge branch 'feature/stable-cadence' into bastian/cadence-1-migratio…
turbolent Feb 22, 2024
faad624
Merge branch 'feature/stable-cadence' into bastian/cadence-1-migratio…
turbolent Feb 23, 2024
388a112
simplify
turbolent Feb 26, 2024
1bc3c79
Merge branch 'feature/stable-cadence' into bastian/cadence-1-migratio…
turbolent Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ WORKDIR /app

ARG GOARCH=amd64
# TAGS can be overriden to modify the go build tags (e.g. build without netgo)
ARG TAGS="netgo"
ARG TAGS="netgo,osusergo"
# CC flag can be overwritten to specify a C compiler
ARG CC=""
# CGO_FLAG uses ADX instructions by default, flag can be overwritten to build without ADX
Expand Down
8 changes: 6 additions & 2 deletions cmd/util/ledger/migrations/change_contract_code_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func SystemContractChanges(chainID flow.ChainID, options SystemContractChangesOp
stakingCollectionAddress = mustHexAddress("0x95e019a17d0e23d7")
stakingProxyAddress = mustHexAddress("0x7aad92e5a0715d21")

case flow.Emulator:
case flow.Emulator, flow.Localnet:
stakingCollectionAddress = common.Address(systemContracts.FlowServiceAccount.Address)
stakingProxyAddress = common.Address(systemContracts.FlowServiceAccount.Address)

Expand Down Expand Up @@ -358,7 +358,11 @@ func SystemContractChanges(chainID flow.ChainID, options SystemContractChangesOp
),
}

if chainID != flow.Emulator {
switch chainID {
case flow.Emulator, flow.Localnet:
// skip

default:
contractChanges = append(
contractChanges,
SystemContractChange{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ require (
github.com/multiformats/go-multiaddr-dns v0.3.1
github.com/multiformats/go-multihash v0.2.3
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f
github.com/onflow/cadence v1.0.0-M6
github.com/onflow/cadence v1.0.0-preview.2.0.20240213230739-27d2386c0cab
github.com/onflow/crypto v0.25.0
github.com/onflow/flow v0.3.4
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2476,8 +2476,8 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f h1:Z8/PgTqOgOg02MTRpTBYO2k16FE6z4wEOtaC2WBR9Xo=
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8=
github.com/onflow/cadence v1.0.0-M6 h1:3Y5xFrmOGMCAaHKNjEwCbnDFlkwZHDzeOtrcX9beWMA=
github.com/onflow/cadence v1.0.0-M6/go.mod h1:a4mccDU90hmuxCLUFzs9J/ANG/rYbFa36h4Z0bBAqNU=
github.com/onflow/cadence v1.0.0-preview.2.0.20240213230739-27d2386c0cab h1:6AxBNV03Ip29tcsJye7uuk4mXEFWH6HPyCE7avP6Zcw=
github.com/onflow/cadence v1.0.0-preview.2.0.20240213230739-27d2386c0cab/go.mod h1:a4mccDU90hmuxCLUFzs9J/ANG/rYbFa36h4Z0bBAqNU=
github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg=
github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI=
github.com/onflow/flow v0.3.4 h1:FXUWVdYB90f/rjNcY0Owo30gL790tiYff9Pb/sycXYE=
Expand Down
Loading