|
|
|
|
|
by Animats
3254 days ago
|
|
Oh, they loaded the Etherium blockchain into an SQL database. Easy. From the title, it appeared that someone had figured out how to represent an SQL database in the blockchain using the virtual machine for contracts. That would be hard. As I've pointed out before, smart contracts need atomic transactions. Either everything commits, or nothing commits. This is a basic property needed for accounting systems. |
|
There's one well-known exception, which is that if your contract sends ETH to another contract, invoking its fallback function, then a throw in the callee just means the call returns false. So in that particular case you have to check the return value and rethrow to make it atomic; this sounds crazy but in some circumstances you don't actually want to throw. The compiler gives you a warning if you don't check.