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

Refactor code to prepare for security audit #108

Closed
maraoz opened this issue Dec 14, 2016 · 9 comments · Fixed by #146
Closed

Refactor code to prepare for security audit #108

maraoz opened this issue Dec 14, 2016 · 9 comments · Fixed by #146
Assignees

Comments

@maraoz
Copy link
Contributor

maraoz commented Dec 14, 2016

No description provided.

@maraoz maraoz changed the title Refactor code to prepare for code audit Refactor code to prepare for security audit Dec 14, 2016
@Qkyrie
Copy link

Qkyrie commented Dec 15, 2016

any todo's that can be picked up here?

@maraoz
Copy link
Contributor Author

maraoz commented Dec 15, 2016

I don't have any concrete tasks to list, my plan was to traverse the whole codebase and check that code style is good, and easy to understand. If you read our code audits you'll see I mention a lot of advice to make the auditor's life easier. If you're interested, feel free to read them and apply similar ideas to Zeppelin:

@Qkyrie
Copy link

Qkyrie commented Dec 16, 2016

Will definitely do!

@veox
Copy link

veox commented Feb 15, 2017

Any thoughts on making documentation with Doxygen, instead of the current Sphinx? In particular, Solidity docs mention Doxygen-like comments, as does this wiki page about NSF.

Making documentation inline with code could improve general doc quality, or at least highlight what's missing. This could make an auditor's life easier, and maybe a general user's, too.

This would mean switching doc-gen machinery, though, which will complicate things for the project maintainers. Sphinx can't directly handle non-Python code with Doxygen-style comments AFAIK, but it can use an extension, breathe, to generate from Doxygen-produced XML, like described in this SO answer. That would mean having two doc-gen systems instead of one, though.

@veox
Copy link

veox commented Feb 15, 2017

OTOH, it may be simpler to extract Doxygen-style comment lines from .sol files, format them a bit, and dump to respective .rst files for Sphinx to handle. Essentially the same as now, but scripted instead of manual.

@maraoz
Copy link
Contributor Author

maraoz commented Feb 16, 2017

@veox I like that idea

@veox
Copy link

veox commented Feb 16, 2017

Heh, which one?

I've accidentally started working on the latter, here's WIP so far. (It's pretty ugly, and misses much of what makes a language.)

(EDIT: Just noticed breathe is available on RTD.io. The above wasn't necessary.)

What this increasingly looks like would be much better instead of "dumping" it straight into doc/source, though, is a custom Sphinx domain for Solidity.

There turns out to be a Sphinx extension for this, too - domaintools. Using that, however, would probably require modifications to the doc-building machine. It seems this is possible with readthedocs.

@veox
Copy link

veox commented Feb 16, 2017

To clarify, there is still need to extract the natspec before passing to Sphinx. A custom Sphinx domain is not strictly necessary - something similar, like Javascript, could probably be used.

@maraoz
Copy link
Contributor Author

maraoz commented Feb 17, 2017

@veox The latter :) would you like to open a new issue for that? I'm closing this issue based on work on this PR: #146

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 a pull request may close this issue.

5 participants