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

Embed solc / Ensure Solidity compiler availability #565

Closed
0xc1c4da opened this issue Dec 20, 2016 · 12 comments
Closed

Embed solc / Ensure Solidity compiler availability #565

0xc1c4da opened this issue Dec 20, 2016 · 12 comments

Comments

@0xc1c4da
Copy link
Contributor

Project Oaken's DApp fails on Contract Deployment on their DApp here:
http://50.112.52.169/pages/index.html

The method createMeter that fails can be found in http://50.112.52.169/ethjs/ethFunctions.js

They believe it is because of the account being locked, ideally we should intercept this like sendTransaction and make user aware.

@0xc1c4da
Copy link
Contributor Author

This is abit strange to me, as I was sure contract deployment was via sendTransaction

@0xc1c4da
Copy link
Contributor Author

@0xc1c4da
Copy link
Contributor Author

@0xc1c4da 0xc1c4da changed the title Password Prompt on Contract Deployment Embed solc / Ensure Solidity compiler availability Dec 21, 2016
@0xc1c4da
Copy link
Contributor Author

Since solc might be a challenge to embed and execute (will rely on @farazdagi advise on here)
an alternative would be to use the Emscripten compiled version of solc and execute in a JS environment

https://www.npmjs.com/package/solc
https://github.com/ethereum/solc-bin

@0xc1c4da
Copy link
Contributor Author

0xc1c4da commented Dec 30, 2016

Some updates on this, the current static library cgo wrapper for solc is about 17mb, if we're supporting 3 architectures thats a ~50mb additional size, now we have our own web3 provider in webview, it makes alot more sense to use the npm emcscripten version of solc, as it is only 7mb and would work across all 3 architectures.

@rasom
Copy link
Contributor

rasom commented Dec 30, 2016

There is the next error when i'm trying to run solc-bin in Otto:

(anonymous): Line 2:1126536 Invalid regular expression: re2: Invalid (?=) <lookahead> (and 103 more errors)

@rasom
Copy link
Contributor

rasom commented Dec 30, 2016

That's the part of the code that causes error, as i undertnad

var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;

@rasom
Copy link
Contributor

rasom commented Dec 30, 2016

?! (negative lookahead) also causes this error. So we need to rewrite this regex if we are going to run solc-bin in Otto, as golang doesn't support lookahead/lookbehind StefanSchroeder/Golang-Regex-Tutorial#11

@0xc1c4da
Copy link
Contributor Author

New emscripten solc in nightly.2017.1.13+ 5x speedup

@0xc1c4da 0xc1c4da added this to the 0.9.4 milestone Feb 4, 2017
@alwx alwx self-assigned this Feb 20, 2017
@0xc1c4da
Copy link
Contributor Author

We can possibly close this because ethereum/EIPs/issues/209

@Souptacular
Copy link

Having solc as a command line option in geth (accessed through a web3 call) is very rarely used and I believe the geth team has deprecated it (see Jarrad's comment above). At Oaken we no longer need this feature. Because it was opened at our request feel free to close it. Thanks!

@jeluard
Copy link
Contributor

jeluard commented Oct 20, 2017

eth_compile methods have been deprecated and removed from geth.

@jeluard jeluard closed this as completed Oct 20, 2017
@jeluard jeluard removed this from the 0.9.4 milestone Oct 20, 2017
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

No branches or pull requests

7 participants