Skip to content

Wrong order Statistics attributes #93

Closed

Description

@emielsebastiaan

There seems to be a wrong order in the ASN for Statistics attributes.
This (serialization) order was changed in 0.7.0.

CoreActivityRecord

https://github.com/davxy/jam-test-vectors/blob/536eb7c715fd4d38bda32581dc2fa6ffeecfce7c/lib/jam-types.asn#L470

Source of change: gavofyork/graypaper@v0.6.7...v0.7.0#diff-a048dfe274d2605e8ab2cc8d34563e8d5f41b50fe16907604a1fa14ad22286b4R83-R86

Correct order as per GP-0.7.0-eq:13.6

    ...
    imports         U16,
    -- Number of segments exported to DA during block processing
    extrinsic-count U16,
    -- Serialized work bundle size written to DA.
    extrinsic-size  U32,
    -- Total number of extrinsics for reported work.
    exports         U16,
    -- Total size of extrinsics for reported work.
    ...

ServiceActivityRecord

https://github.com/davxy/jam-test-vectors/blob/536eb7c715fd4d38bda32581dc2fa6ffeecfce7c/lib/jam-types.asn#L494

Source of change: gavofyork/graypaper@v0.6.7...v0.7.0#diff-a048dfe274d2605e8ab2cc8d34563e8d5f41b50fe16907604a1fa14ad22286b4R95-R98

Correct order as per GP-0.7.0-eq:13.7

    ...
    imports               U32,
    -- Number of segments exported into the DL
    extrinsic-count       U32,
    -- Number of work-items accumulated
    extrinsic-size        U32,
    -- Total number of extrinsics used
    exports               U32,
    -- Total size of extrinsics used
    ...

Definitions/semantics of x and e can be found in GP-0.7.0-eq:11.6.
Graypaper 0.7.0 is consistent with the use of the attributes. My conclusion is that the order in the Statistics ASN parts need to be changed.

Activity

  1. davxy commented on Aug 26, 2025

    @davxy
    Member

    Good catch. You're right.
    I can’t see any valid reason for this reshuffling.
    It doesn’t even show up explicitly in the change list, but is buried in the macroification changes. So it seems almost accidental.
    In any case, we’ll need to fix it.

  2. emielsebastiaan commented on Aug 26, 2025

    @emielsebastiaan
    Author

    Yes that is eq:13.7.
    Second header in this issue should have been ServiceActivityRecord

  3. davxy commented on Aug 26, 2025

    @davxy
    Member

    @emielsebastiaan can you review?
    #94

  4. emielsebastiaan commented on Aug 26, 2025

    @emielsebastiaan
    Author

    @emielsebastiaan can you review? #94
    Looks good; #94 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions