-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
big-integer
shim testing on android-jsc
#6221
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
81f4a2c
Format package.json
leotm bdbe7ab
Add big-integer
leotm 706163a
Shim BigInt with big-integer
leotm 17d3788
Test 1n
leotm d867bc8
Revert "Test 1n"
leotm 521417a
Test BigInt(2) + BigInt(3)
leotm 0b6ce50
Revert "Test BigInt(2) + BigInt(3)"
leotm 4f73743
Add @metamask/utils
leotm d598537
Test @metamask/utils
leotm cdc1fb0
Revert "Test @metamask/utils"
leotm 0dd5fa0
Bump pod lockfile Cocoapods from 11.3 to 1.12.1
leotm 74a6aa4
Add @ethereumjs/util 8.0.6
leotm 436993f
Import @ethereumjs/util methods (no error)
leotm 64fb902
Test @ethereumjs/util arrToBufArr only (error)
leotm 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
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.
@leotm in case you're not aware and it's relevant, this will pull in a WASM dependency. MetaMask/eth-sig-util#302 (comment)
My understanding is that
@chainsafe/ssz
is runtime-agnostic as of recent0.11.1
, which will be incorporated in an imminent@ethereumjs/*
release.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.
thanks again for bringing up earlier ^ and the link
gotcha so the shim could be incompat w
@ethereumjs/util>@ChainSafe/ssz>@chainsafe/as-sha256
's wasm serialisation, which@ethereumjs/util
bump might fix (replacing w e.g. js-onlynoble-hashes
)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.
the shim's unsupported big int literals on android-jsc (e.g.
1n
) remainbut yeah not rly a prob long as
@ethereumjs/util
doesn't complainThere 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.
testing
@ethereumjs/util
8.0.6 witharrToBufArr
64fb902 throws (screenshot)which is true
node_modules/zlib
doesn't exist 🤔and noticed
@ethereumjs/util/src/index.ts also exports * from './provider'
'./provider' imports fetch from 'micro-ftch'
'./provider' exports fetchFromProvider
edit: ah
zlib
is a node API we'd need to shim too forarrToBufArr
looks like https://github.com/tradle/rn-nodeify/blob/master/shims.js#L3 already has
browserify-zlib
to potentially add to ourpostinstall.sh
(otherwise shim manually again likebig-integer
)if going down this potential whack-a-mole route, to get all
@ethereumjs/util
methods likearrToBufArr
workingalso we have a Metro warning which could be related
warn Package @metamask/eth-sig-util has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/leo/Documents/GitHub/metamask-mobile/node_modules/@metamask/eth-sig-util/package.json
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.
just checked a fresh (RN 0.71.6) as well
switched off Hermes (for android-jsc)
added and ran
rn-nodeify --install http,https,zlib,events,util --hack --yarn
(minimal shims)added and manually shimmed
big-integer
added
@ethereumjs/util
8.0.6 and testedarrToBufArr
which gets us past node missing shim issues like
zlib
onto a new issue (potentially more):