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

feature(lib/runtime): implement ext_offchain_timestamp and ext_offchain_sleep_until #1806

Merged
merged 37 commits into from
Nov 15, 2021

Conversation

omar391
Copy link
Contributor

@omar391 omar391 commented Sep 24, 2021

Changes

  • Added ext_offchain_timestamp method
  • Added ext_offchain_sleep_until method
  • Renamed RuntimeStorageAPI interface into OffchainStorageAPI

Tests

go test -timeout 30s -run ^Test_ext_offchain_sleep_until_version_1$ github.com/ChainSafe/gossamer/lib/runtime/wasmer
go test -timeout 30s -run ^Test_ext_offchain_timestamp_version_1$ github.com/ChainSafe/gossamer/lib/runtime/wasmer

Issues

Primary Reviewer

@CLAassistant
Copy link

CLAassistant commented Sep 24, 2021

CLA assistant check
All committers have signed the CLA.

lib/runtime/wasmer/imports.go Outdated Show resolved Hide resolved
Copy link
Member

@EclesioMeloJunior EclesioMeloJunior left a comment

Choose a reason for hiding this comment

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

lgtm

lib/runtime/wasmer/imports.go Outdated Show resolved Hide resolved
lib/runtime/constants.go Outdated Show resolved Hide resolved
Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

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

looks good :D please just update HOST_API_TEST_RUNTIME_URL

Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

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

actually, tests are failing due to this:

lib/runtime/wasmer/imports_test.go:75:54: time.Now().UnixMilli undefined (type time.Time has no field or method UnixMilli)
lib/runtime/wasmer/imports.go:1565:20: undefined: time.UnixMilli

however time.UnixMilli is defined: https://pkg.go.dev/time#UnixMilli can you update the go.mod version to go 1.17? (and the README)

@timwu20
Copy link
Contributor

timwu20 commented Oct 26, 2021

@omar391 can you make sure all the checks pass and merge this in?

go.mod Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

timwu20 pushed a commit to timwu20/gossamer that referenced this pull request Dec 6, 2021
…chain_sleep_until` (ChainSafe#1806)

* Issue#1508 First commit

* Changed interface name + Added testcase

* Removed leftover comments

* Updated host api runtime + Added testcase

* add support for polkadot runtime v0.9.10

* cleanup

* Removed testcases temporarily

* Updated base Go version to 1.17 to resolve time.UnixMilli issues

* Updated go.mod

* Removed unused context

* Updated go-version to 1.17.x in github workflows

* Updated go version in the Dockerfile

* added .devcontainer in the gitignore

* Linked related issue for the unimplemented unit test

* Fixed CGO issues

* Fixed lint issues

* Fixed unit tests

Co-authored-by: noot <elizabethjbinks@gmail.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
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.

ext_offchain_timestamp_version_1
7 participants