Skip to content

Conversation

@Reisen
Copy link
Contributor

@Reisen Reisen commented May 22, 2023

This PR is to help Hermes, it changes the message format serialized by the validator to include the slot and ring size instead of the ring index. This is because hermes ideally would be able to associate accumulators with a slot, the current ring index can simply be calculated as slot % ring_size when needed. This adds a small amount of overhead to messages of 64 gas. The serialize function added to MerklePath is also for Hermes.

This PR also fixes clippy/rustfmt pre-commit hooks so there's a little noise.

@vercel
Copy link

vercel bot commented May 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) May 22, 2023 2:11pm
xc-admin-frontend ⬜️ Ignored (Inspect) May 22, 2023 2:11pm

}

Some(serialized)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

why did this need to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ali asked for this as he is serializing these in hermes by hand, this is also not the right place for this and I am hoping to replace the distributed hand-rolled serialization soon, but as the PR is modifying one serializer and Ali needed another it made sense to couple the change-set for now, I can remove this and leave the hand-rolling in hermes or do it in a separate PR if you prefer, but I'm planning to rip this out so I figured It's fine to place the current serialization in the same place until I move it all out.

@Reisen Reisen merged commit 5ee1f20 into main May 22, 2023
@Reisen Reisen deleted the reisen/pythnet-serialization-fixes branch May 22, 2023 17:31
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.

3 participants