-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Call For Action: standard library for Solidity #228
Comments
In my opinion, the library should be extremely well documented using natspec and if possible, it should be formally verified. Are there any opinions against putting it inside the solidity repository? |
+1. I'm in favor of requiring inclusion of proper natspec as well as documentation.
Future requirement? This isn't currently doable correct?
+1 but we should be sure to declare what semantic versioning means.
I would like to be able to have the documentation live alongside the code. Readthedocs is an easy to configure resource for this sort of thing, so if it goes in the solidity library, I'd like for the docs to be able to live in the same branch as the code (as opposed to the I'm advocating a hard requirement of documentation because a culture of good documentation will pay us back 10 fold in making it easier for new devs to get up to speed. |
My gut feel is that although it would be nice to have standard APIs in the standard libraries, it's a bit too early to start pushing them in there. We don't quite know where these standards will go. Even now, we are changing it (https://gist.github.com/frozeman/090ae32041bcfe120824). |
are functions a first-class citizen in solidity? if so, it would be great to have the and if they're not, then maybe using an "functional interface" equivalent as java 8 does... |
d5d2115 example contract using array, fixed ethereum#185 21ed235 removed connection keep-alive c44fe01 version 0.7.1 d9b785e fixed ethereum#248 490dde5 fixed encoding/decoding strings, ethereum#249 b3f5d09 fixed long bytes dynamic decoding/encoding, ethereum#249 d097821 small filter improvement d59b1cd removed xhr from browser 42b6e9d version 0.7.0 fe6defd gulp 44dcd24 set connection keepalive 2b17c0f gulpfile changes 4a46c73 Merge pull request ethereum#228 from ethereum/strings 93c8006 tests for encoding and decoding prematurely terminated strings and strings containing internal zeros 7dd44e7 Merge branch 'strings' of https://github.com/ethereum/ethereum.js into strings 390a9ff Merge branch 'develop' into strings bcd9cfb updated deps, removed unused karma ef15fc1 Merge pull request ethereum#244 from ethereum/allevents 6f74d57 Merge branch 'develop' into allevents 7aca17e Merge branch 'develop' into allevents c5ee34d fix for optional event parameters 8170a0a Merge pull request ethereum#245 from ethereum/filterInstantWatch 76a094c fixed all issues noted by marek d78b512 add possible callback to filters e1b17a9 re-build develop af9c027 all events filter b270616 version 0.6.1 c47d6a8 gulp 7cf7cf3 map file 6da1d3e gulp 450042e Update eth.js 3951286 Added sendRawTransaction 323b529 merged develop 16ffdf6 merged master ecf0a2c changed | to Math.floor d2b5ba2 Merge pull request ethereum#239 from ethereum/mistFixes 9e6bf9d removed browser XHR 9061116 fixed build issues in formatInputDynamicBytes 0e3b29c fixed coverage issue d51e9a2 merged latest develop f0247aa made meteor package available on the server side as well e97c5f5 fixed and tested meteor package init 3e49f56 add currentProvidor and mist fixes bd6d9ba merged develop 7b730b1 Merge branch 'strings' of github.com:ethereum/web3.js into strings cc533d9 fixed bytes wrong encoding 8c6f976 Merge branch 'develop' into strings 7c970e3 add bytes32 test with leading 0 9c7f7bb re-add .map files 189484f add extra int tests 73cc711 Merge branch 'develop' into strings fa3239f abi string type, fixes ethereum#216, ethereum#218, ethereum#219 git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: d5d2115bf9ad07a736a189e1022b7d3a549e4006
Not sure if it's been fixed, but last time I documented with natspec it was not possible to document multiple return-values (like you do multiple params). It works, but it isn't formatted properly in devdoc. Natspec in general feels a bit under-developed, Perhaps start in that end? I would be happy to contribute to this in any way I can, code, documentation, tests. Especially tests. I can probably put in as much as 20-25% time. I think it is essential to have some way to run code directly through the EVM for testing. If the standard library is put in the Solidity rep like suggested, it would be simple to write either a separate suite or maybe include it in the regular library tests, depending on what's best. |
Any updates on this project/issue? |
I'm doing some contract that might make it in at some point (in fact I do them on chriseth's request), including a secp256k1 implementation, some string stuff etc. Gonna have RLP encoding/decoding and other Ethereum related functionality as well. There is still the issue of how tests will be carried out and such, which is why i work in a separate repo. There's a new issue on how to do it from RPC (#516), and when that's been settled maybe they will be accepted into official Solidity stl. In that case I will port the tests to that system. |
Standard library! (Made by a group of people that checks each-others code etc.) |
See also @vbuterin's post: https://blog.ethereum.org/2016/06/19/thinking-smart-contract-security/
|
This is an ongoing process and will never be "closed", although we need a kind of "registry" of library contracts. I hope that tools like dapphub and live-libs can fill this gap soon. |
This from the original discussion is not a concern anymore after #527 is done. |
Call For Action: "Standard Solidity Library"
Solidity is quickly improving thanks to the work of everyone involved. The compiler is getting in a better shape every day and providing the low level features nicely, however support for higher level features still needs to improve. Many have created helper functions, but all these efforts are scattered around in different places.
I have created a tree called density as a start to this effort. So far it contains a very limited set of features:
I've did the above a week ago, but only pushed it now. I have also some string utilities, such as conversion of address to string, which I haven't committed yet.
I wasn't able to find everything via Google before, but now more and more such snippets have surfaced. Either I'm getting bad at using Google or it is harder to get meaningful results out of it. The following "libraries" already exists out there:
I think the standard library should contain:
I don’t think it should go into dapp-bin, but a separate tree for the library only. And that tree probably should belong to an org on github as opposed to a person.
The questions are:
Based on git history, the following users have contributed to the libraries: @chriseth, @fivedogit, @obscuren, @bertani, @pipermerriam. Calling all you guys for input.
Appendix A. - List of useful helpers
The text was updated successfully, but these errors were encountered: