Skip to content

STF Vectors #28

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

Open
wants to merge 242 commits into
base: master
Choose a base branch
from
Open

STF Vectors #28

wants to merge 242 commits into from

Conversation

davxy
Copy link
Contributor

@davxy davxy commented Dec 7, 2024

GP Version 0.6.4

Keeping up to date all the PRs has become overwhelming.

This PR superseeds the previous STF vectors PRs.

In the future, the other PRs may be reopened to merge individual subsystems' STFs separately. For now, I prefer to consolidate everything into a single PR.


Partially address #21


Please file an Issue

If you have suggestions, issues, or requests for changes, please open an issue in the downstream fork: https://github.com/davxy/jam-test-vectors/issues.

Engaging in constructive discussions within this flat conversation thread is not the most efficient or agile approach.

@dakk
Copy link

dakk commented Mar 24, 2025

I think there are some issue on WorkResult binary encoding. work_result_0.bin contains the following:

04 03 02 01 70 A5 08 29 85 1E 8F 6A 8C 80 F9 28 06 AE 0E 95 EB 7C 06 AD 06 4E 31 1C C3 91 07 B3 21 9E 53 2E FA 99 B9 7E 72 FC FA EF 61 61 08 DE 98 1A 59 DC 33 10 E2 A9 F5 E7 3C D4 4D 70 2E CA AC CD 86 96 2A 00 00 00 00 00 00 00 00 03 AA BB CC 00 00 00 00 00

Inspecting the final part:

  • 00 03 AA BB CC - is the result status (0 - OK) + size of payload (3) + the payload
  • then we should have 8 + 2 + 2 + 4 + 2 = 18 bytes (for gas_used + RefineLoad), while we have 5 bytes only

@davxy
Copy link
Contributor Author

davxy commented Mar 24, 2025

I think there are some issue on WorkResult binary encoding. work_result_0.bin contains the following:

04 03 02 01 70 A5 08 29 85 1E 8F 6A 8C 80 F9 28 06 AE 0E 95 EB 7C 06 AD 06 4E 31 1C C3 91 07 B3 21 9E 53 2E FA 99 B9 7E 72 FC FA EF 61 61 08 DE 98 1A 59 DC 33 10 E2 A9 F5 E7 3C D4 4D 70 2E CA AC CD 86 96 2A 00 00 00 00 00 00 00 00 03 AA BB CC 00 00 00 00 00

Inspecting the final part:

* 00 03 AA BB CC - is the result status (0 - OK) + size of payload (3) + the payload

* then we should have 8 + 2 + 2 + 4 + 2 = 18 bytes (for gas_used + RefineLoad), while we have 5 bytes only

Before I dig in, these fields are using compact encoding. Have you checked that?

@dakk
Copy link

dakk commented Mar 24, 2025

I think there are some issue on WorkResult binary encoding. work_result_0.bin contains the following:

04 03 02 01 70 A5 08 29 85 1E 8F 6A 8C 80 F9 28 06 AE 0E 95 EB 7C 06 AD 06 4E 31 1C C3 91 07 B3 21 9E 53 2E FA 99 B9 7E 72 FC FA EF 61 61 08 DE 98 1A 59 DC 33 10 E2 A9 F5 E7 3C D4 4D 70 2E CA AC CD 86 96 2A 00 00 00 00 00 00 00 00 03 AA BB CC 00 00 00 00 00

Inspecting the final part:

* 00 03 AA BB CC - is the result status (0 - OK) + size of payload (3) + the payload

* then we should have 8 + 2 + 2 + 4 + 2 = 18 bytes (for gas_used + RefineLoad), while we have 5 bytes only

Before I dig in, these fields are using compact encoding. Have you checked that?

My fault; I was using the size version of integer encoding.

@emielsebastiaan
Copy link

Suggestion to remove/adjust constraint here:

We use this variable-length encoding exclusively for the prefix of

Due to recent changes regarding use of Variable Length Integer Encoding.
gavofyork/graypaper#310

@vekexasia
Copy link

Hey davxy in the test stats_with_epoch_change-1 under statistics i have a newly created service statistic with ServiceIndex=0 with the following data:

{
    imports: 0,
    exports: 0,
    extrinsicSize: 0,
    extrinsicCount: 0,
    refinement: { count: 2, usedGas: 0n },
    provided: { count: 3, size: 51 },
    accumulate: { count: 0, usedGas: 0n },
    transfers: { count: 0, usedGas: 0n }
  }

it seems correct on my end as this service appears in both Ep and r

note:

  • i am currently feeding in the transfer & accumulate statistics with empty data as they're not provided as input
  • for coreStatistics i am feeding in rho dagger

@jaymansfield
Copy link

jaymansfield commented Mar 30, 2025

I think there is an issue with the new codec for ServiceActivityRecord.

Some of the attributes are not in the correct order (due to typo in GP)

So instead of

...
imports 
extrinsic-count
extrinsic-size
exports
...

it should be

...
imports 
exports
extrinsic-size
extrinsic-count
...

Exports moves up, and the two extrinsic ones need to be swapped.

Please see gavofyork/graypaper#315

@dakk
Copy link

dakk commented Mar 31, 2025

@davxy I think accumulate tests are not valid for 0.6.4, since the test service is compiled using jam-types==0.1.12, were the AccumulateItem is missing exports_root and authorizer_hash introduced with 0.6.4: https://docs.rs/jam-types/0.1.12/jam_types/struct.AccumulateItem.html

guarantees GuaranteesExtrinsic,

-- [H_t] Block's timeslot.
slot TimeSlot

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add known_packages

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.