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

Return Option<Vec<u8>> from get_bytes #860

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2245092
implement new alloc fun with global store
iFrostizz Apr 22, 2024
e9bd1fd
make sure that only known bounds are reached
iFrostizz Apr 23, 2024
608bed9
use a map for the store
iFrostizz Apr 23, 2024
26dd0df
remove use of HostPtr
iFrostizz Apr 24, 2024
cd9313a
return pointer from go alloc
iFrostizz Apr 24, 2024
df3b46d
apply review suggestions
iFrostizz Apr 24, 2024
0be3d16
Fix the counter tests
richardpringle Apr 24, 2024
d0cb8ad
fix token test
iFrostizz Apr 24, 2024
b84d849
Merge branch 'main' into global_store
iFrostizz Apr 24, 2024
739fd00
remove usage of SmartPtr in test
iFrostizz Apr 24, 2024
f8b9a40
use is_null to check for pointer nulleness
iFrostizz Apr 24, 2024
4f0ca0f
silent deprecated tag
iFrostizz Apr 24, 2024
2100806
fix clippy in test
iFrostizz Apr 24, 2024
0d6b1ff
fix panic *expected* messages
iFrostizz Apr 24, 2024
39d96ef
remove useless test
iFrostizz Apr 24, 2024
3b614b8
get_bytes returns Option
iFrostizz Apr 25, 2024
532be43
Merge branch 'main' into get_bytes_fix
iFrostizz Apr 26, 2024
dd61b02
remove duplicated test
iFrostizz Apr 26, 2024
9d6b854
sync memory to main
iFrostizz Apr 26, 2024
aec0521
make `into_bytes` pub
iFrostizz Apr 26, 2024
76f8132
Cached state values in the program state (#840)
iFrostizz Apr 29, 2024
e8a5f70
[x/programs] safe wrapper around C ffi interface (#869)
iFrostizz Apr 29, 2024
4ef8b2a
[x/programs] Fix program calling another program on the Rust side (#866)
iFrostizz Apr 30, 2024
5fb26c1
Consolidate CI (#828)
richardpringle May 1, 2024
879403b
Update vm-release.yml (#876)
richardpringle May 1, 2024
80a2714
implement new alloc fun with global store
iFrostizz May 1, 2024
1e51355
make sure that only known bounds are reached
iFrostizz May 1, 2024
ab5ace5
use a map for the store
iFrostizz May 1, 2024
7c8137a
remove use of HostPtr
iFrostizz May 1, 2024
c096879
return pointer from go alloc
iFrostizz May 1, 2024
58677fb
apply review suggestions
iFrostizz May 1, 2024
c57d6ea
use is_null to check for pointer nulleness
iFrostizz May 1, 2024
c109e02
silent deprecated tag
iFrostizz May 1, 2024
f2d4d68
fix clippy in test
iFrostizz May 1, 2024
653a2f1
fix panic *expected* messages
iFrostizz May 1, 2024
3a8c2f0
get_bytes returns Option
iFrostizz May 1, 2024
8a81895
remove duplicated test
iFrostizz May 1, 2024
b3533ff
sync memory to main
iFrostizz Apr 26, 2024
90b9728
make `into_bytes` pub
iFrostizz May 1, 2024
13c72d9
Merge branch 'get_bytes_fix' of github.com:iFrostizz/hypersdk into ge…
iFrostizz May 1, 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
23 changes: 23 additions & 0 deletions .github/actions/install-go/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Install Go toolchain with defaults'
description: 'Install a go toolchain with defaults'

inputs:
cache:
description: "to cache or not to cache, that is the question"
required: false
default: "true"
cache-dependency-path:
description: "forwards go actions/setup-go"
required: false


runs:
using: composite
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
cache: ${{ inputs.cache }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}
21 changes: 21 additions & 0 deletions .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Install Rust toolchain and Cache'
description: 'Install a rust toolchain and cache'

inputs:
targets:
description: 'pass targets to the rust-toolchain installer'
required: false
cache:
description: "to cache or not to cache, that is the question"
required: false
default: "true"

runs:
using: composite
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ inputs.targets }}
- if: ${{ inputs.cache == 'true' }}
uses: Swatinem/rust-cache@v2
23 changes: 23 additions & 0 deletions .github/actions/token-wallet-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Release Token Wallet'
description: 'Release the Token Wallet'

runs:
using: composite
steps:
- name: Set up Go
uses: ./.github/actions/install-go
with:
cache-dependency-path: |
go.sum
examples/tokenvm/go.sum
- name: Build wallet
working-directory: ./examples/tokenvm/cmd/token-wallet
shell: bash
run: scripts/build.sh
env:
PUBLISH: "false"
- name: Archive Builds
uses: actions/upload-artifact@v4
with:
name: token-wallet
path: ./examples/tokenvm/cmd/token-wallet/token-wallet.zip
52 changes: 52 additions & 0 deletions .github/actions/vm-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'Release VM'
description: 'Release the VM'

inputs:
vm-name:
description: 'VM name'
required: true
github-token:
description: 'GitHub Token'
required: true

runs:
using: composite
steps:
- name: Set up Go
uses: ./.github/actions/install-go
with:
cache-dependency-path: |
go.sum
examples/${{ inputs.vm-name }}/go.sum
- name: Set up arm64 cross compiler
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install gcc-aarch64-linux-gnu
- name: Checkout osxcross
uses: actions/checkout@v2
with:
repository: tpoechtrager/osxcross
path: osxcross
- name: Build osxcross
shell: bash
run: |
sudo apt-get -y install clang llvm-dev libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip sed cpio libbz2-dev
cd osxcross
wget https://github.com/joseluisq/macosx-sdks/releases/download/12.3/$MACOS_SDK_FNAME -O tarballs/$MACOS_SDK_FNAME
echo $MACOS_SDK_CHECKSUM tarballs/$MACOS_SDK_FNAME | sha256sum -c -
UNATTENDED=1 ./build.sh
echo $PWD/target/bin >> $GITHUB_PATH
env:
MACOS_SDK_FNAME: MacOSX12.3.sdk.tar.xz
MACOS_SDK_CHECKSUM: 3abd261ceb483c44295a6623fdffe5d44fc4ac2c872526576ec5ab5ad0f6e26c
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release
workdir: ./examples/${{ inputs.vm-name }}/
env:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ inputs.github-token }}
27 changes: 0 additions & 27 deletions .github/workflows/auto-generated-checker.yml

This file was deleted.

59 changes: 29 additions & 30 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ['main']
schedule:
- cron: '41 18 * * 3'

Expand All @@ -35,44 +35,43 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ['go']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
Loading
Loading