Vdb 833 more robust statediffing tests #15

Closed
elizabethengelman wants to merge 3 commits from VDB-833-more-robust-statediffing-tests into statediffing
elizabethengelman commented 2019-09-18 17:19:48 +00:00 (Migrated from github.com)

Updated the contract that's being used to test the statediffing work. The biggest change is that TestContract now has different data types in it's storage: bytes32, address, uint48, uint256[10], mapping(uint => TestStruct).

Note: I was having trouble calculating the TestStruct storage key earlier, but I think it was a silly mistake that I figured out, and it is now working. i.e. common.HexToHash(“3”) !=common.Hex2Bytes(“03”) != common.Hex2Bytes(“3”) 🤦‍♀

This should be ready for review finally! 😅

Updated the contract that's being used to test the statediffing work. The biggest change is that `TestContract` now has different data types in it's storage: bytes32, address, uint48, uint256[10], mapping(uint => TestStruct). _Note:_ I was having trouble calculating the TestStruct storage key earlier, but I think it was a silly mistake that I figured out, and it is now working. i.e. common.HexToHash(“3”) !=common.Hex2Bytes(“03”) != common.Hex2Bytes(“3”) 🤦‍♀ This should be ready for review finally! 😅
aaizuss (Migrated from github.com) reviewed 2019-09-18 17:19:48 +00:00
Gslaughl (Migrated from github.com) reviewed 2019-09-18 17:19:48 +00:00
m0ar (Migrated from github.com) reviewed 2019-09-18 17:19:48 +00:00
rmulhol (Migrated from github.com) reviewed 2019-09-18 17:19:48 +00:00
yaoandrew (Migrated from github.com) reviewed 2019-09-18 17:19:48 +00:00
i-norden approved these changes 2019-09-20 23:48:22 +00:00
i-norden left a comment
Member

LGTM! Thanks for improving these tests :)

LGTM! Thanks for improving these tests :)
i-norden reviewed 2019-09-20 23:54:01 +00:00
@ -74,3 +88,4 @@
burnAccountBlock1, _ = rlp.EncodeToBytes(state.Account{
Nonce: nonce0,
Balance: big.NewInt(miningReward),
CodeHash: common.HexToHash("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470").Bytes(),
Member

I see how the emitted keys are so confusing now, since calculateTestStructStorageKey already returns a hash/the key itself is already a hash.

I see how the emitted keys are so confusing now, since `calculateTestStructStorageKey` already returns a hash/the key itself is already a hash.

Pull request closed

Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#15
No description provided.