marnett / ethereum

0 stars 0 forks source link

Misc. issues [send(), simple bank, suggested edits] #24

Closed akosba closed 9 years ago

akosba commented 9 years ago

1- I recommend consistency in how send() is being used. I have seen send(25, .. , ..), send(100, .. , ..) and send(0, .. , ..) in different places in the two documents. I recommend using the two-parameter version when we just send money, as I think there is no specific reason to do any of the previous when we send money to some other address, without calling other contracts.


2 This is a point that I mentioned an email before. In the "easy bank" example, I am not sure if using "Taylor" makes things easy. I wonder why the destination address is not passed as an argument as well, along with the value? I think this won't add much complexity, and the example will look nicer (that fits a simple generic bank). Another reason I think this might cause confusion this way is that the storage of the senders is indexed by public addresses, while the storage of the destination is indexed by the name of the recipient.


3- Other things: I have not reviewed everything thoroughly yet, but these are few things that I noticed.

a- Section 4.2 has few Latex issues.

b- Please fix my email in the two documents to: akosba@cs.umd.edu

c- Please replace every "persistant" with "persistent".

Thanks!

firesnowball commented 9 years ago

Funny you mention point 2. I just noticed that I never added the updated contract to the LaTeX. I added it a minute or two ago. Also, I fixed the LaTeX issues in 4.2.

amiller commented 9 years ago

Regarding point 1... even when you are just intending to send money to a user, it's import to do send(0,...). Otherwise you're sending all the gas to an address that might be a contract, you can't easily determine whether it's a user or not (I guess you can, with <addr>.code, but that's complicated). So in general the 2-parameter version is only useful for self-sends or sends between contracts.

Also I fixed the remaining Persistant's.