Mistakes in the white paper language spec

mquandallemquandalle FranceMember Posts: 50 ✭✭
From the white paper:

* (52) MLOAD - pops two items and sets the item in memory at index S[-1] to S[-2]
* (54) SLOAD - pops two items and sets the item in storage at index S[-1] to S[-2]

But this is not what the official VM do [1]. Those operations only pop one item and push the associated value in memory/storage on top of the stack.

BTW the S[-i] notation, defined as follows "S[-1], S[-2], etc represent the topmost, second topmost, etc items on the stack" isn't rigorous since in the opcode definitions we pop the items before using the notation, so they are no more on the top of the stack.

Maybe you should open this wiki to external contributors via github issues and pull requests?

[1] https://github.com/ethereum/eth-go/blob/c1d0ea7366f1bad134c985dbe1f272d376e5ec9b/ethchain/vm.go#L323-L325

Comments

Sign In or Register to comment.