Hey look I wrote a thing for work!
Dec. 26th, 2018 06:39 pmSo, at work I'm working on a Solidity debugger, right? Which, of course, needs to be able to display the current states of the variables, meaning it needs to be able to decode the representations of those variables. Of course, the debugger could already do that to a large extent when I was hired, but it still didn't handle all types of data. And so after encountering some unexpected situations in which it didn't behave correctly, I decided that, before I could start fixing it, what I had to do was write down a complete description of just how Solidity stored data. This was originally just some notes of mine, but Nick (the debugger's original author, and now my team's lead) thought it was worth cleaning up and making public.
I have no idea how many of you are interested in Ethereum and Solidity internals, but, hey, maybe you just like reading random technical documents for fun. If so, here you go! Everything I think a debugger-writer should need to know about data representation in Solidity. Note that not everything in there has been personally verified (that would have taken too long), so there may be some mistakes.
Yes, I included some irrelevant information just because I thought it was interesting. There's even more interesting but irrelevant information I uncovered during the writing of this that I ultimately decided to leave out.
Anyway I think this is pretty cool. There's 4 tables. :)
(...of course, the best table I've ever made is still Table 1 from this paper. :) (Note that I've linked to an older arXiv version because I like its version of Table 1 better, but you're likely better off reading the newer or published version.))
I was going to write more here but decided to turn that into a separate post. So, uh, more coming soon! (...not more related to this. Just more. Or so I intend, anyway.)
I have no idea how many of you are interested in Ethereum and Solidity internals, but, hey, maybe you just like reading random technical documents for fun. If so, here you go! Everything I think a debugger-writer should need to know about data representation in Solidity. Note that not everything in there has been personally verified (that would have taken too long), so there may be some mistakes.
Yes, I included some irrelevant information just because I thought it was interesting. There's even more interesting but irrelevant information I uncovered during the writing of this that I ultimately decided to leave out.
Anyway I think this is pretty cool. There's 4 tables. :)
(...of course, the best table I've ever made is still Table 1 from this paper. :) (Note that I've linked to an older arXiv version because I like its version of Table 1 better, but you're likely better off reading the newer or published version.))
I was going to write more here but decided to turn that into a separate post. So, uh, more coming soon! (...not more related to this. Just more. Or so I intend, anyway.)
no subject
Date: 2018-12-27 01:13 pm (UTC)no subject
Date: 2018-12-28 05:59 am (UTC)Unfortunately the published version got rid of the dashes, swapping out surreal exponentiation (with dashes to indicate that it's not an operation on ordinals) for just "none", making the dashes redundant. Hence why I linked this version. :) (But the published version is still almost as good. :) )
I had actually originally intended to bold the other natural operations to indicate that they weren't continuous, but the package I was using to do the bolding conflicted with the package I was using to do the dashes, and I figured the bolding was unnecessary. I could have brought it back in the published version, I suppose, but ultimately deemed it more trouble than it was worth.
I also thought for a while about whether to try to match the actual angle of the table with the diagonal text, before deciding that was futile and to just go with a simple 45 degree angle. :P
The tables in my Solidity data representation expanation obviously are just simple rectangles and also a lot of the entries are basically "this is a special case, see the text". :P Oh well. Solidity is complicated in the way that human-built systems are...