gavofyork / graypaper

The JAM Specification
101 stars 37 forks source link

Serialization adjustments #67

Closed davxy closed 1 week ago

davxy commented 3 weeks ago

basedafdev commented 1 week ago

As mentioned by @vekexasia earlier in [https://github.com/w3f/jamtestvectors/pull/12], for the Assurances Extrinsic, can we also add explicit $E_2$ for the validator index?

davxy commented 1 week ago

If this statement (GP 0.3.6 - just below eq. 272) is and remains true:

Note that at present this is utilized only in encoding the length prefix of variable-length sequences.

perhaps adopting a "catch all" rule might be easier.

Something like: $x \in \mathbb{N}_{2^k}$ encoded as $E_{k/8}$

gavofyork commented 1 week ago

That doesn't work in the axiomatic set theory in which GP is written since $\mathbb{N}{2^8} \subset \mathbb{N}{2^{16}}$, thereby making encoded integers variable length without introducing a discriminator.

To make it work we'd need to introduce a form of typing, which I'd prefer not to do as it would severely complicate the the base language of the GP.