-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add a VM with Contract support #1493
Merged
Merged
Changes from 81 commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
2fae4fa
stash
dboehm-avalabs 23fd0d6
Merge branch 'main' into ProgramsVM
dboehm-avalabs 08d3c68
stash
dboehm-avalabs adea757
Update run.sh
dboehm-avalabs 902769d
Merge branch 'main' into ProgramsVM
dboehm-avalabs 09be1f0
stash
dboehm-avalabs 0eab86a
stash
dboehm-avalabs 0953477
stash working
dboehm-avalabs bb53a4b
stash
dboehm-avalabs b4f0057
cleanup
dboehm-avalabs 684a0cf
Merge branch 'main' into ProgramsVM
dboehm-avalabs c0f3972
stash
dboehm-avalabs 0ffc1f8
recorder
dboehm-avalabs 00c9d25
fix
dboehm-avalabs f5b74cd
Merge branch 'main' into ProgramsVM
dboehm-avalabs 59106a5
merge main
dboehm-avalabs 6523a65
Merge branch 'main' into ProgramsVM
dboehm-avalabs d9e170d
Add RPC Simulation
dboehm-avalabs 5b23dea
add file based program submit
dboehm-avalabs c8939c8
stash
dboehm-avalabs 52c1b56
Merge branch 'main' into ProgramsVM
dboehm-avalabs d291484
stash
dboehm-avalabs 170f044
stash
dboehm-avalabs d5eedf4
add morpheus back
dboehm-avalabs 0f7c71e
fix package
dboehm-avalabs 5081439
Update main.go
dboehm-avalabs 2d475e0
Update websocket_server.go
dboehm-avalabs 362cd4d
cleanup publish
dboehm-avalabs 0613b8a
Update integration_test.go
dboehm-avalabs e8b9f65
Update vm.go
dboehm-avalabs faa0249
Update integration_test.go
dboehm-avalabs f312502
stash
dboehm-avalabs 3fedaa6
add
dboehm-avalabs dcd86f8
Merge branch 'main' into ProgramsVM
dboehm-avalabs 8aacc2e
Merge branch 'ConvertProgramID' into ProgramsVM
dboehm-avalabs bea48eb
stash
dboehm-avalabs 83a7287
stash
dboehm-avalabs 4331b6c
stash
dboehm-avalabs a44c3c6
looped
dboehm-avalabs e092d3b
stash
dboehm-avalabs 007ba83
add file
dboehm-avalabs 81e3150
fix
dboehm-avalabs 473da80
Update integration_test.go
dboehm-avalabs 79e48b2
delete
dboehm-avalabs d88001f
Merge branch 'main' into ProgramsVM
dboehm-avalabs 8e604b6
stash
dboehm-avalabs 71d38a2
Merge branch 'main' into ProgramsVM
dboehm-avalabs 8888f47
Update import_log_release.go
dboehm-avalabs f572ff6
fix balance stuff
dboehm-avalabs 419c02c
Merge branch 'main' into ProgramsVM
dboehm-avalabs fc1772d
Merge branch 'main' into ProgramsVM
dboehm-avalabs 1215a69
merged
dboehm-avalabs f1522a4
Merge branch 'main' into ProgramsVM
dboehm-avalabs 3b0b0ba
commit
dboehm-avalabs fd747fd
Update import_log_release.go
dboehm-avalabs 6e954e6
Create demo.pk
dboehm-avalabs 49e90d2
Merge branch 'main' into ProgramsVM
dboehm-avalabs 3ec2ae9
Add cleanup
dboehm-avalabs 4b2b4a3
comments
dboehm-avalabs 65aa088
Update recorder.go
dboehm-avalabs e967cc9
ci
dboehm-avalabs 00bf95c
lint
dboehm-avalabs 578db1b
undo
dboehm-avalabs 6ac704d
Update tests.unit.sh
dboehm-avalabs 47ed4d7
lint
dboehm-avalabs 50c1f93
Update vm/vm.go
dboehm-avalabs 09cae9c
call test
dboehm-avalabs 9fa04e4
Update call_test.go
dboehm-avalabs 3b79a76
Merge branch 'main' into ProgramsVM
dboehm-avalabs 4b73a67
merge
dboehm-avalabs 5db1455
lint
dboehm-avalabs 4c3ce89
fix run script
dboehm-avalabs 3bbc5e6
Merge branch 'main' into ProgramsVM
dboehm-avalabs 4ebb376
Merge branch 'main' into ProgramsVM
richardpringle abf209b
Use internal APIs
richardpringle c45bde4
Don't run tests on vm-with-contracts
richardpringle 0f7c873
Merge remote-tracking branch 'origin/main' into ProgramsVM
richardpringle dd396e8
Point to the proper fees package
richardpringle 675238b
Use non-internal fees package
richardpringle dabe06c
Fix tests
richardpringle 079ca84
Merge branch 'main' into ProgramsVM
richardpringle 55c6a77
Fix immutable state implementation (#1543)
aaronbuchwald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# Copyright (C) 2023, Ava Labs, Inc. All rights reserved. | ||
# See the file LICENSE for licensing terms. | ||
|
||
# https://golangci-lint.run/usage/configuration/ | ||
run: | ||
timeout: 10m | ||
# skip auto-generated files. | ||
skip-files: | ||
- ".*\\.pb\\.go$" | ||
- ".*mock.*" | ||
|
||
issues: | ||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3. | ||
max-same-issues: 0 | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- depguard | ||
- errcheck | ||
- errorlint | ||
- exportloopref | ||
- goconst | ||
- gocritic | ||
- gofmt | ||
- gofumpt | ||
- goimports | ||
- revive | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- nolintlint | ||
- prealloc | ||
- stylecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- unconvert | ||
- whitespace | ||
- staticcheck | ||
- bodyclose | ||
- goprintffuncname | ||
- typecheck | ||
- noctx | ||
|
||
linters-settings: | ||
errorlint: | ||
# Check for plain type assertions and type switches. | ||
asserts: false | ||
# Check for plain error comparisons. | ||
comparison: false | ||
revive: | ||
rules: | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr | ||
- name: bool-literal-in-expr | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return | ||
- name: early-return | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines | ||
- name: empty-lines | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag | ||
- name: struct-tag | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming | ||
- name: unexported-naming | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error | ||
- name: unhandled-error | ||
disabled: false | ||
arguments: | ||
- "fmt.Fprint" | ||
- "fmt.Fprintf" | ||
- "fmt.Print" | ||
- "fmt.Printf" | ||
- "fmt.Println" | ||
- "rand.Read" | ||
- "sb.WriteString" | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter | ||
- name: unused-parameter | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver | ||
- name: unused-receiver | ||
disabled: false | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break | ||
- name: useless-break | ||
disabled: false | ||
staticcheck: | ||
# https://staticcheck.io/docs/options#checks | ||
checks: | ||
- "all" | ||
- "-SA6002" # argument should be pointer-like to avoid allocation, for sync.Pool | ||
- "-SA1019" # deprecated packages e.g., golang.org/x/crypto/ripemd160 | ||
# https://golangci-lint.run/usage/linters#gosec | ||
gosec: | ||
excludes: | ||
- G107 # https://securego.io/docs/rules/g107.html | ||
depguard: | ||
rules: | ||
packages: | ||
deny: | ||
- pkg: "github.com/stretchr/testify/assert" | ||
desc: github.com/stretchr/testify/require should be used instead. | ||
- pkg: "io/ioutil" | ||
desc: io/ioutil is deprecated. Use package io or os instead. | ||
include-go-root: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Copyright (C) 2023, Ava Labs, Inc. All rights reserved. | ||
# See the file LICENSE for licensing terms. | ||
|
||
# ref. https://goreleaser.com/customization/build/ | ||
builds: | ||
- id: vmwithcontracts-cli | ||
main: ./cmd/vmwithcontracts-cli | ||
binary: vmwithcontracts-cli | ||
flags: | ||
- -v | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=1 | ||
- CGO_CFLAGS=-O -D__BLST_PORTABLE__ # Set the CGO flags to use the portable version of BLST | ||
overrides: | ||
- goos: linux | ||
goarch: arm64 | ||
env: | ||
- CC=aarch64-linux-gnu-gcc | ||
- goos: darwin | ||
goarch: arm64 | ||
env: | ||
- CC=oa64-clang | ||
- goos: darwin | ||
goarch: amd64 | ||
goamd64: v1 | ||
env: | ||
- CC=o64-clang | ||
- id: vmwithcontracts | ||
main: ./cmd/vmwithcontracts | ||
binary: vmwithcontracts | ||
flags: | ||
- -v | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=1 | ||
- CGO_CFLAGS=-O -D__BLST_PORTABLE__ # Set the CGO flags to use the portable version of BLST | ||
overrides: | ||
- goos: linux | ||
goarch: arm64 | ||
env: | ||
- CC=aarch64-linux-gnu-gcc | ||
- goos: darwin | ||
goarch: arm64 | ||
env: | ||
- CC=oa64-clang | ||
- goos: darwin | ||
goarch: amd64 | ||
goamd64: v1 | ||
env: | ||
- CC=o64-clang | ||
|
||
checksum: | ||
name_template: "vmwithcontracts_checksums.txt" | ||
|
||
archives: | ||
- id: default | ||
name_template: 'vmwithcontracts_{{ .Version }}_{{ .Os }}_{{ .Arch }}' | ||
|
||
release: | ||
make_latest: false # Should be done manually | ||
mode: 'keep-existing' # Should not override releases | ||
github: | ||
owner: ava-labs | ||
name: hypersdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Copyright (C) 2023, Ava Labs, Inc. All rights reserved. | ||
|
||
Ecosystem License | ||
Version: 1.1 | ||
|
||
Subject to the terms herein, Ava Labs, Inc. (**“Ava Labs”**) hereby grants you | ||
a limited, royalty-free, worldwide, non-sublicensable, non-transferable, | ||
non-exclusive license to use, copy, modify, create derivative works based on, | ||
and redistribute the Software, in source code, binary, or any other form, | ||
including any modifications or derivative works of the Software (collectively, | ||
**“Licensed Software”**), in each case subject to this Ecosystem License | ||
(**“License”**). | ||
|
||
This License applies to all copies, modifications, derivative works, and any | ||
other form or usage of the Licensed Software. You will include and display | ||
this License, without modification, with all uses of the Licensed Software, | ||
regardless of form. | ||
|
||
You will use the Licensed Software solely (i) in connection with the Avalanche | ||
Public Blockchain platform, having a NetworkID of 1 (Mainnet) or 5 (Fuji), and | ||
associated blockchains, comprised exclusively of the Avalanche X-Chain, | ||
C-Chain, P-Chain and any subnets linked to the P-Chain (“Avalanche Authorized | ||
Platform”) or (ii) for non-production, testing or research purposes within the | ||
Avalanche ecosystem, in each case, without any commercial application | ||
(“Non-Commercial Use”); provided that this License does not permit use of the | ||
Licensed Software in connection with (a) any forks of the Avalanche Authorized | ||
Platform or (b) in any manner not operationally connected to the Avalanche | ||
Authorized Platform other than, for the avoidance of doubt, the limited | ||
exception for Non-Commercial Use. Ava Labs may publicly announce changes or | ||
additions to the Avalanche Authorized Platform, which may expand or modify | ||
usage of the Licensed Software. Upon such announcement, the Avalanche | ||
Authorized Platform will be deemed to be the then-current iteration of such | ||
platform. | ||
|
||
You hereby acknowledge and agree to the terms set forth at | ||
www.avalabs.org/important-notice. | ||
|
||
If you use the Licensed Software in violation of this License, this License | ||
will automatically terminate and Ava Labs reserves all rights to seek any | ||
remedy for such violation. | ||
|
||
Except for uses explicitly permitted in this License, Ava Labs retains all | ||
rights in the Licensed Software, including without limitation the ability to | ||
modify it. | ||
|
||
Except as required or explicitly permitted by this License, you will not use | ||
any Ava Labs names, logos, or trademarks without Ava Labs’ prior written | ||
consent. | ||
|
||
You may use this License for software other than the “Licensed Software” | ||
specified above, as long as the only change to this License is the definition | ||
of the term “Licensed Software.” | ||
|
||
The Licensed Software may reference third party components. You acknowledge | ||
and agree that these third party components may be governed by a separate | ||
license or terms and that you will comply with them. | ||
|
||
**TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE LICENSED SOFTWARE IS PROVIDED | ||
ON AN “AS IS” BASIS, AND AVA LABS EXPRESSLY DISCLAIMS AND EXCLUDES ALL | ||
REPRESENTATIONS, WARRANTIES AND OTHER TERMS AND CONDITIONS, WHETHER EXPRESS OR | ||
IMPLIED, INCLUDING WITHOUT LIMITATION BY OPERATION OF LAW OR BY CUSTOM, | ||
STATUTE OR OTHERWISE, AND INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTY, | ||
TERM, OR CONDITION OF NON-INFRINGEMENT, MERCHANTABILITY, TITLE, OR FITNESS FOR | ||
PARTICULAR PURPOSE. YOU USE THE LICENSED SOFTWARE AT YOUR OWN RISK. AVA LABS | ||
EXPRESSLY DISCLAIMS ALL LIABILITY (INCLUDING FOR ALL DIRECT, CONSEQUENTIAL OR | ||
OTHER DAMAGES OR LOSSES) RELATED TO ANY USE OF THE LICENSED SOFTWARE.** |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a GitHub issue to fix these?