specs icon indicating copy to clipboard operation
specs copied to clipboard

[OP Plasma] Specify commitment encoding standards for generic server types

Open epociask opened this issue 8 months ago • 0 comments

Alt da servers (I.e, generic commitment types) are expected to encode the type byte prefix as per the server side generated commitment for the client to decode when querying. Additionally these servers are expected to decode the type byte when reading (i.e, /GET).

The spec should likely be updated to reflect this server side encoding/decoding requirement. Otherwise it may make sense to only do the type encoding within core OP services. Currently the commitment is decoded in the da client to then be re-encoded when setting the tx data byte resulting in a redundant encoding operation.

  • https://github.com/ethereum-optimism/optimism/blob/926ba71288ec558b2acc6b1b6399e66e73ab0fcc/op-plasma/daclient.go#L133-L136
  • https://github.com/ethereum-optimism/optimism/blob/develop/op-batcher/batcher/driver.go#L505-L513

epociask avatar Jun 07 '24 02:06 epociask