Skip to content

Conversation

@davxy
Copy link
Owner

@davxy davxy commented Jul 16, 2025

@davxy davxy changed the title Prepare CHANGELOG GP v0.6.7 Jul 16, 2025
@jaymansfield
Copy link

jaymansfield commented Aug 1, 2025

Thanks for these.

  1. In the json, can these fields be renamed to use an underscore rather then a dash/hyphen for consistency with other elements: deposit-offset, creation-slot, last-accumulation-slot, parent-service

EDIT: Removed second question, figured it out.


So far all stf, safrole traces and fallback traces pass for me.

I get a different gas used amount in reports-l0/00000002 but other fields are matching.

@davxy
Copy link
Owner Author

davxy commented Aug 1, 2025

1. In the json, can these fields be renamed to use an underscore rather then a dash/hyphen for consistency with other elements: deposit-offset, creation-slot, last-accumulation-slot, parent-service

to what json you refer to?

EDIT: Removed second question, figured it out.

well, the second service code preimage fails to load but perhaps we need to update the accumulate slot anyway? So maybe you were right. I need to check the gp

@jaymansfield
Copy link

jaymansfield commented Aug 1, 2025

1. In the json, can these fields be renamed to use an underscore rather then a dash/hyphen for consistency with other elements: deposit-offset, creation-slot, last-accumulation-slot, parent-service

to what json you refer to?

EDIT: Removed second question, figured it out.

well, the second service code preimage fails to load but perhaps we need to update the accumulate slot anyway? So maybe you were right. I need to check the gp

The service accounts. For example stf/accumulate/tiny/accumulate_ready_queued_reports-1.json:

"service": {
"code_hash": "0x24cfba622fa847e2d8c4ead22dfac3e46a71eafde5998a642092536d0e7f3648",
"balance": 141733,
"min_item_gas": 10,
"min_memo_gas": 10,
"bytes": 41666,
"deposit-offset": 0,
"items": 3,
"creation-slot": 0,
"last-accumulation-slot": 43,
"parent-service": 0
},

Old attributes are named like "min_item_gas", "min_memo_gas". New ones use a dash instead: "deposit-offset", "creation-slot". Just mentioning for consistency in naming.

@davxy
Copy link
Owner Author

davxy commented Aug 1, 2025

Old attributes are named like "min_item_gas", "min_memo_gas". New ones use a dash instead: "deposit-offset", "creation-slot". Just mentioning for consistency in naming.

Ok

Regarding the accum slot, you were right. We need to update both services last slot. I'll fix it

@sourabhniyogi
Copy link

sourabhniyogi commented Aug 1, 2025

For traces, we are passing fallback + safrole but are dying early on reports-l0/00000002 and reports-l1/00000002 -- can you paste the pvm traces for one or both?

@davxy
Copy link
Owner Author

davxy commented Aug 3, 2025

@sourabhniyogi I’ve provided the light variant of the traces related to the reports:

  • Normal = up to 6 work items per package
  • Light = 1 work item per package max

Since I regenerated all the traces, some parts of the traces may have changed.
Could you please re-run them (starting with the light variant) and let me know if everything looks good now?
If not, just let me know which PVM trace you'd like me to provide you.

@jaymansfield
Copy link

jaymansfield commented Aug 3, 2025

A trace for any of these would be really useful as I'm still running into gas discrepancies and I'm assuming its probably the same issue causing my problem in each.

preimages_light/00000003 - Javajam: 14446. Polkajam: 14658
preimages/00000002 - Javajam: 14366. Polkajam: 14578
storage_light/00000003 - javajam: 63606. polkajam: 63818
storage/00000002 - javajam: 159667. polkajam: 159879

Everything else matches in the post states except gas.

Also just realized they all differ from the same amount somehow: 212.

@sourabhniyogi
Copy link

sourabhniyogi commented Aug 4, 2025

After fixing up the fetch protocol specs to be 0.7.0 (no idea why you would need to do this?), we got to the same observation as @jaymansfield .. that we have 212 less gas across the majority of accumulate state transitions for both storage+preimage, light or not.

Our summary is here which shows the 212 mismatch. Do you have a theory of what is going on at the last 212?

We will check what's going on with some statistics count mismatches here and what we may be missing for the > 212 mismatches.

Note that we had to loosen up our memory checks to get to this state and are ignoring it because we assume something will replace SBRK soonish.

@0xjunha
Copy link

0xjunha commented Aug 4, 2025

Same issue here - FastRoll consumes 212 fewer gas units compared to the test vectors, across all test vectors that invoke accumulation. All other fields match.

@davxy
Copy link
Owner Author

davxy commented Aug 4, 2025

@jaymansfield
Copy link

jaymansfield commented Aug 4, 2025

Thanks @davxy.

2025-08-04 12:01:49 [T] [s=3] service Handling hostcall: log
2025-08-04 12:01:49 [I] [s=3] boot #0 Bootstrap Service Accumulate, 0h @3 $18446744073709551615

Can you confirm what "18446744073709551615" represents in that debug statement in preimages light? Mine is showing "0h @3 $0".

@davxy
Copy link
Owner Author

davxy commented Aug 4, 2025

2025-08-04 12:01:49 [T] [s=3] service Handling hostcall: log
2025-08-04 12:01:49 [I] [s=3] boot #0 Bootstrap Service Accumulate, 0h @3 $18446744073709551615

Can you confirm what "18446744073709551615" represents in that debug statement in preimages light? Mine is showing "0h @3 $0".

@jaymansfield is the service 0 balance as returned by the info host call.
In particular the info returned using u64::MAX as service id (aka the current service).

This is the object that is returned encoded from the info hostcall

ServiceInfo { 
    code_hash: 0xd1f8c2ada30847fd..., 
    balance: 18446744073709551615, 
    threshold: 0, min_item_gas: 10, 
    min_memo_gas: 10, 
    bytes: 161253,
    items: 4, 
    deposit_offset: 18446744073709551615, 
    creation_slot: 0, 
    last_accumulation_slot: 0, 
    parent_service: 0 
}

@jaymansfield
Copy link

jaymansfield commented Aug 4, 2025

2025-08-04 12:01:49 [T] [s=3] service Handling hostcall: log
2025-08-04 12:01:49 [I] [s=3] boot #0 Bootstrap Service Accumulate, 0h @3 $18446744073709551615

Can you confirm what "18446744073709551615" represents in that debug statement in preimages light? Mine is showing "0h @3 $0".

@jaymansfield is the service 0 balance as returned by the info host call. In particular the info returned using u64::MAX as service id (aka the current service).

This is the object that is returned encoded from the info hostcall

ServiceInfo { 
    code_hash: 0xd1f8c2ada30847fd..., 
    balance: 18446744073709551615, 
    threshold: 0, min_item_gas: 10, 
    min_memo_gas: 10, 
    bytes: 161253,
    items: 4, 
    deposit_offset: 18446744073709551615, 
    creation_slot: 0, 
    last_accumulation_slot: 0, 
    parent_service: 0 
}

Service is matching already. Can you check to see which registers you are using for the info host call here:
Screenshot 2025-08-04 at 12 21 54 PM

I noticed if I set it to W9 & W10 the trace passes.

@davxy
Copy link
Owner Author

davxy commented Aug 4, 2025

I noticed if I set it to W9 & W10 the trace passes.

Looks like you found something interesting.
Yeah we're using w9 and w10. That smells like a typo in the GP to me.
I'm not 100% sure, but is there any other instance where we skip registers to pass arguments?
I'm going to propose a fix to the GP anyway

Please use w9 and w10. With this change all the traces are passing?

@jaymansfield
Copy link

I noticed if I set it to W9 & W10 the trace passes.

Looks like you found something interesting. Yeah we're using w9 and w10. That smells like a typo in the GP to me. I'm not 100% sure, but is there any other instance where we skip registers to pass arguments? I'm going to propose a fix to the GP anyway

Please use w9 and w10. With this change all the traces are passing?

Yes all tests pass now for JavaJAM 😀

@davxy
Copy link
Owner Author

davxy commented Aug 4, 2025

Looks like you found something interesting. Yeah we're using w9 and w10. That smells like a typo in the GP to me. I'm not 100% sure, but is there any other instance where we skip registers to pass arguments? I'm going to propose a fix to the GP anyway
Please use w9 and w10. With this change all the traces are passing?

Yes all tests pass now for JavaJAM 😀

@jaymansfield thank you for reporting this

So perhaps that was the issue for you as well? @sourabhniyogi @0xjunha

@0xjunha
Copy link

0xjunha commented Aug 5, 2025

Looks like you found something interesting. Yeah we're using w9 and w10. That smells like a typo in the GP to me. I'm not 100% sure, but is there any other instance where we skip registers to pass arguments? I'm going to propose a fix to the GP anyway
Please use w9 and w10. With this change all the traces are passing?

Yes all tests pass now for JavaJAM 😀

@jaymansfield thank you for reporting this

So perhaps that was the issue for you as well? @sourabhniyogi @0xjunha

Yes, with w9 & w10 for INFO hostcall f & l FastRoll passes all as well. Thanks @davxy @jaymansfield 😀

@davxy
Copy link
Owner Author

davxy commented Aug 5, 2025

FYI : gavofyork/graypaper#480

@sourabhniyogi
Copy link

So perhaps that was the issue for you as well? @sourabhniyogi @0xjunha

We have passed storage-light with the info w9/10 "fix" and are working through preimages-light now. Because @jaymansfield and @0xjunha have support, all issues are almost certainly on our side, so we would like 0.7.0 vectors in the v0.7.0 branch so other teams who got through 0.6.6 can "skip" to that this week?

Will confirm when we're 100% done

@arjanz
Copy link

arjanz commented Aug 6, 2025

PyJAMaz passes all STF en traces tests, with help of comments above 😄

@mkchungs
Copy link

mkchungs commented Aug 7, 2025

JamDuna also passes all v0.6.7 STF trace tests. {preimages_light, preimages, storage_light, storage} -- all passing now.

@qiweiii
Copy link

qiweiii commented Aug 7, 2025

Boka passes all as well

@davxy davxy merged commit 07aa8d7 into master Aug 7, 2025
12 checks passed
@davxy davxy deleted the v0.6.7 branch August 7, 2025 07:03
@davxy davxy mentioned this pull request Aug 7, 2025
@ascrivener
Copy link

Jamzilla passes as well

@danicuki
Copy link

danicuki commented Aug 8, 2025

@jamixir passing all 0.6.7 traces

@sierkov
Copy link

sierkov commented Aug 16, 2025

@davxy Could your share PVM traces for the following test cases?

  • preimages/00000070
  • preimages/00000091
  • preimages/00000092

All 0.6.7 conformance tests are currently passing except for these three, where only minor gas consumption discrepancies are observed: 6, 3, and 3 units respectively.

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

Successfully merging this pull request may close these issues.