-
Notifications
You must be signed in to change notification settings - Fork 469
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
support cross-compilation of stylus programs #2605
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
b933b74
pass targets to rawdb.WrapDatabaseWithWasm, change rawdb.Target to et…
magicxyyz eefd729
compile to targets in WasmTargets list
magicxyyz 2832703
use wasm targets list in SaveActiveProgramToWasmStore
magicxyyz 10f9b15
update geth pin
magicxyyz 758d25f
Merge branch 'master' into cross-compile
magicxyyz 17319ad
update geth pin
magicxyyz cdb43d7
update validation client stylus archs sanity check
magicxyyz 71ab928
change archs list option to extra-archs that must include wavm and is…
magicxyyz 304f2c1
add cross compilation to progam test
magicxyyz 26496b0
Merge branch 'master' into cross-compile
magicxyyz 9004163
Merge branch 'fix-wasm-rebuild-stylus-target' into cross-compile
magicxyyz 3fca01d
Merge branch 'master' into cross-compile
magicxyyz ea0cbc6
update geth pin
magicxyyz 823464c
Merge branch 'master' into cross-compile
magicxyyz 7b4834f
pass WasmTargets to RecordProgram call
magicxyyz 99b34b3
init test: call Validate on StylusTargetConfig
magicxyyz bf735f4
don't call programs.SetTarget for TargetWavm
magicxyyz 29327a8
refactor StylusTargetConfig.Validate
magicxyyz aba9415
error for unsupported stylus target in populateStylusTargetCache
magicxyyz 12fc95d
Merge branch 'master' into cross-compile
magicxyyz 7a4fe00
simplify StylusTargetConfig.Validate
magicxyyz d87e573
Merge branch 'master' into cross-compile
magicxyyz 10a1004
Merge branch 'master' into cross-compile
magicxyyz 1dcd104
Merge branch 'master' into cross-compile
tsahee 610d6a1
Merge branch 'master' into cross-compile
magicxyyz 7617a3b
Merge branch 'master' into cross-compile
magicxyyz 1c4d7e3
Merge branch 'master' into cross-compile
joshuacolvin0 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
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
Submodule go-ethereum
updated
11 files
+2 −2 | arbitrum/apibackend.go | |
+1 −1 | arbitrum/recordingdb.go | |
+15 −19 | core/rawdb/accessors_state_arbitrum.go | |
+15 −4 | core/rawdb/database.go | |
+4 −0 | core/rawdb/table.go | |
+16 −8 | core/state/database.go | |
+2 −1 | core/state/database_arbitrum.go | |
+7 −7 | core/state/statedb_arbitrum.go | |
+4 −4 | core/vm/interface.go | |
+2 −0 | ethdb/database.go | |
+4 −0 | ethdb/remotedb/remotedb.go |
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
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.
compile wavm before the loop. If it fails - return just that error without trying other compilation. If it succeeds add wavm to the map and do the loop. Inside the loop - skip wavm compilation.
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.
wavm is compiled before the loop iterating over targets and if wavm compilation fails we return error:
nitro/arbos/programs/native.go
Lines 81 to 102 in aba9415
I add compiled module to
results
channel in the loop to add it toasmMap
later on only ifrawdb.TargetWavm
is in the targets list. That way the code is ready for not storing wavm if not needed.Does it sound right?
I can change it to always include wavm compilation output in the resulting
asmMap
, but I think that it is enough to require Wavm in WasmTargets list to have it always stored in db in this version.let me know what you think