Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add D to chain specs - assurances/3_002 #123

Closed
jaymansfield opened this issue Mar 4, 2025 · 4 comments
Closed

Add D to chain specs - assurances/3_002 #123

jaymansfield opened this issue Mar 4, 2025 · 4 comments
Assignees

Comments

@jaymansfield
Copy link

DEBUG[03-03|12:53:34.579] 334: PC 1962 LOAD_IMM                    g=9081 pvmHash=7aa9..78e2 reg="[8 4278056040 0 256 0 4278058975 2953942612 4278056088 3 4278056408 8 4278056408 0]"
DEBUG[03-03|12:53:34.579] 335: PC 1965 ECALLI                      g=9081 pvmHash=7aa9..78e2 reg="[8 4278056040 0 256 0 4278058975 2953942612 4278056088 3 4278056408 8 4278056408 0]"
DEBUG[03-03|12:53:34.579] QUERY chargeGas                          gasCharged=10  beforeGas=9081 afterGas=9071
DEBUG[03-03|12:53:34.580] QUERY OK                                 h=0x6a0d4a19d199505713fc65f531038e73f1d885645632c8ae503c4f0c4d5e19a7 z=3 w7=150,323,855,362 w8=38              len(anchor_timeslot)=2
DEBUG[03-03|12:53:34.580] 335: PC 1967 ECALLI COMPLETE             g=9071 reg="[8 4278056040 0 256 0 4278058975 2953942612 150323855362 38 4278056408 8 4278056408 0]"

I have a different result for this host call.

Input hash: 0x6a0d4a19d199505713fc65f531038e73f1d885645632c8ae503c4f0c4d5e19a7
Input length: 3

Pre-state value for this hash:

s=2953942612|h=0x6a0d4a19d199505713fc65f531038e73f1d885645632c8ae503c4f0c4d5e19a7 l=3|t=[29 31 35] tlen=3

Your results:
w7=150,323,855,362
w8=38

My results:

w7=3 +(2^32)x
w7=3 +(2^32)(29)
w7=3 + (4294967296)(29)
w7=124554051587

w8=y+(2^32)z
w8=31+(2^32)(35)
w8=31+(4294967296)(35)
w8=150323855391

@sourabhniyogi sourabhniyogi self-assigned this Mar 4, 2025
@sourabhniyogi
Copy link
Contributor

w7=150,323,855,362
w8=38

After the "FORGET" host call the prestate [29 31 35] becomes [35 38], around here:

DEBUG[03-03|12:53:34.578] 324: PC 1929 ECALLI                      g=9101 pvmHash=0270..948d reg="[8 4278056040 0 256 0 4278058975 2953942612 4278056088 3 0 4278056408 4278056408 0]"
DEBUG[03-03|12:53:34.578] FORGET chargeGas                         gasCharged=10  beforeGas=9101 afterGas=9091
DEBUG[03-03|12:53:34.579] FORGET OK                                h=0x6a0d4a19d199505713fc65f531038e73f1d885645632c8ae503c4f0c4d5e19a7 z=3 newvalue="[35 38]"
DEBUG[03-03|12:53:34.579] 324: PC 1931 ECALLI COMPLETE             g=9091 reg="[8 4278056040 0 256 0 4278058975 2953942612 0 3 0 4278056408 4278056408 0]"

0.6.3 is clear here about a length 3 becoming length 2 here:

Image

Thus the query results demand x=35, y=38 here:

Image
w7 = 2+(2^32) x   =150,323,855,362
w8 = y = 38

@jaymansfield
Copy link
Author

jaymansfield commented Mar 4, 2025

What value do you use for constant D?

"y < t - D" is false for me.

y=31
t=38
D=28800

Becomes 31 < -28762

@sourabhniyogi
Copy link
Contributor

sourabhniyogi commented Mar 4, 2025

Ah thats the problem, I forgot to put the D I wanted for tiny/small/medium/large to enable forget to not take 4 hours but like 40 seconds or something like that to enable forget to be testable.

Will add it to tiny/small/medium/large chain specs as preimages are pretty important to test.

I had D as 0 actually to force a forget but didn't really think about updating the chain specs and intended to keep going with both sides of D in later fibs.

Let me suggest something more precise so that solicit/forget can be tested within a minute in a fib update.

@sourabhniyogi sourabhniyogi changed the title Query host function in assurances/3_002 Query host function in assurances/3_002 ==> D suitable for solicit/forget testing in tiny/small/medium/large Mar 4, 2025
@sourabhniyogi sourabhniyogi changed the title Query host function in assurances/3_002 ==> D suitable for solicit/forget testing in tiny/small/medium/large Add D to chain specs - assurances/3_002 Mar 4, 2025
sourabhniyogi added a commit that referenced this issue Mar 4, 2025
Addresses several issues reported by @jaymansfield:
* #125 Incorporating new services upon panic - Assurances/3_006
* #123 Add D to chain specs - assurances/3_002
* #121 Fix state_snapshots lookup_meta value - assurances/2_007

Also:
* #112 Adjust Chainspecs to be EC friendly as per advice from Dave Emmett
* update README
sourabhniyogi added a commit that referenced this issue Mar 5, 2025
Addresses several issues reported by @jaymansfield:
* #125 Incorporating new services upon panic - Assurances/3_006
* #123 Add D to chain specs - assurances/3_002
* #121 Fix state_snapshots lookup_meta value - assurances/2_007

Also:
* #112 Adjust Chainspecs to be EC friendly as per advice from Dave Emmett
* update README
sourabhniyogi added a commit that referenced this issue Mar 5, 2025
* #112 Adjust Chainspecs to be EC friendly
* #123 Add D to chain specs - assurances/3_002
* update README to document fuzzing
sourabhniyogi added a commit that referenced this issue Mar 5, 2025
Major:
* #125 Y/Checkpoint treatment (panic of Assurances/3_006) -- see new fib2

Minor:
* #123 forget case - Add D to chain specs - assurances/3_002
* #121 minor fix state_snapshots lookup_meta value - assurances/2_007
sourabhniyogi added a commit that referenced this issue Mar 5, 2025
Major:
* #125 Y/Checkpoint treatment (panic of Assurances/3_006) -- see new fib2

Minor:
* #123 forget case - Add D to chain specs - assurances/3_002
* #121 minor fix state_snapshots lookup_meta value - assurances/2_007
@sourabhniyogi
Copy link
Contributor

Added a new D to the chainspecs.json -- its very low, only 6 right now for tiny. But, this enables "fast" forget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants