Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Examine hamt #201

Closed
wants to merge 6 commits into from
Closed

Examine hamt #201

wants to merge 6 commits into from

Conversation

willscott
Copy link
Contributor

note: gocmp won't handle the full extent of a 3 way diff, so if we decide we need that, we'll end up with a bunch of additional logic to write.

This expands and provides insight into state root differences down to actor level:

Diff:   (*main.hamtNode)(Inverse(hamt.Node, &main.dag{
- 	ID:       s"bafy2bzacebuvoa3sslpbvz7qdkielph2gthzogp747747q3l7reogzxmkoeas",
+ 	ID:       s"bafy2bzacebqcoge3qnuv2kcqztnvlngd2cpydh2aitkup4njh3hl5ch2lg7qs",
  	Children: map[cid.Cid]interface{}{},
  	KVs: []main.kv{
  		{
  			Key: []uint8{0x00, 0x04},
  			Value: &types.Actor{
  				Code:    s"bafkqaetgnfwc6mjpon2g64tbm5sxa33xmvza",
- 				Head:    s"bafy2bzacednn4752arbtc25yjc3gkzj75a4kozuxkimvdr7njp4psv4lpvo6s",
+ 				Head:    s"bafy2bzaceapigtzewavukvtpjz6vlaje6ljv5oal4zchowqj6oo5rbn4yazsg",
  				Nonce:   0x00,
  				Balance: big.Int{Int: s"30000000000000"},
  			},
  		},
  		{
  			Key: []uint8{0x00, 0xe2, 0x32},
  			Value: &types.Actor{
  				Code:    s"bafkqaetgnfwc6mjpon2g64tbm5sw22lomvza",
- 				Head:    s"bafy2bzacecnwc267dnvctlal4logruamgalxidz2gymglpspga54sghoy5zsc",
+ 				Head:    s"bafy2bzacea6o3uyjvrbspot2ctx3zywzzx3woayguybztpskjutjdpakomdak",
  				Nonce:   0x00,
  				Balance: big.Int{Int: s"3073736017153794680188896"},
  			},
  		},
  		{
  			Key: []uint8{0x00, 0xe6, 0x25},
  			Value: &types.Actor{
  				Code:    s"bafkqadlgnfwc6mjpmfrwg33vnz2a",
  				Head:    s"bafy2bzaceaj5s2datvfhmex4u6p2mb66huqqq6qanckuwwfo73fc5gfzsalxy",
- 				Nonce:   0x1fad,
+ 				Nonce:   0x1fae,
- 				Balance: big.Int{Int: s"7073326284564908077557230"},
+ 				Balance: big.Int{Int: s"7073326284564786636283430"},
  			},
  		},
  		{Key: []uint8{0x00, 0x01}, Value: &types.Actor{Code: s"bafkqactgnfwc6mjpnfxgs5a", Head: s"bafy2bzacecxlid3ntwbnq775nx6vqrg6ozxii2hyhcd4n4gktxlilufzdhq7c", Balance: big.Int{Int: s"0"}}},
  		{
  			Key: []uint8{0x00, 0x02},
  			Value: &types.Actor{
  				Code:    s"bafkqaddgnfwc6mjpojsxoylsmq",
  				Head:    s"bafy2bzacecrdsz2scyuqqscs7v32oelqlpq4oymicptzclrmfntlzf2krotac",
  				Nonce:   0x00,
- 				Balance: big.Int{Int: s"1099624989525574571780738896"},
+ 				Balance: big.Int{Int: s"1099624989525574693222012696"},
  			},
  		},
  	},
  }))

Currently it takes in one test case and shows what changes between the pre and post root.

TODO:

  • Ascribe prettier names to actors
  • Expand the actor Head to its internal state tree

raulk and others added 3 commits August 5, 2020 19:45
* warn when extracting a message from a tipset that contains
  more leading messages from the same sender, as this leads to
  nonce misalignment.
* fix mocked randomness being too short (must be 32 bytes).
* mock some further verification syscalls.
@raulk raulk added this to Review in progress in VM Conformance Tests Aug 10, 2020
@willscott
Copy link
Contributor Author

factored to separate command / continued in #227

@willscott willscott closed this Aug 13, 2020
VM Conformance Tests automation moved this from Review in progress 👀 to Done ✅ Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants