Skip to content
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

EventStream Parser #1

Closed
QianSwirlds opened this issue Jul 25, 2019 · 1 comment
Closed

EventStream Parser #1

QianSwirlds opened this issue Jul 25, 2019 · 1 comment
Assignees
Labels
enhancement Type: New feature P3 parser Area: File parsing
Milestone

Comments

@QianSwirlds
Copy link
Contributor

Add an EventStream Parser to parse new version EventStream files.
format:

Type Description Value
int EVENT_STREAM_FILE_VERSION 2
byte TYPE_PREV_HASH 1
byte[48] Previous File Hash
byte STREAM_EVENT_START_NO_TRANS_WITH_VERSION (0x5b) or STREAM_EVENT_START_WITH_VERSION (0x5a)
int STREAM_EVENT_VERSION 2
long event.creatorId
long event.creatorSeq
long event.otherId
long event.otherSeq
long event.selfParentGen
long event.otherParentGen
NullableByteArray event.selfParentHash if read an Int -1, it means the array is null; else the int value is the length of the byte array to be read
NullableByteArray event.otherParentHash same as above
Transaction[] event.transactions only exists if we have read STREAM_EVENT_START_WITH_VERSION earlier
Instant event.timeCreated
byte[] event.signature
byte commEventLast 0x46
byte[] event.getHash()
Instant event.consensusTimestamp
long event.consensusOrder
byte STREAM_EVENT_START_NO_TRANS_WITH_VERSION (0x5b) or STREAM_EVENT_START_WITH_VERSION (0x5a)
int STREAM_EVENT_VERSION 2
next Event info...
byte STREAM_EVENT_START_NO_TRANS_WITH_VERSION (0x5b) or STREAM_EVENT_START_WITH_VERSION (0x5a)
int STREAM_EVENT_VERSION 2
next Event info...
...
@QianSwirlds QianSwirlds self-assigned this Jul 25, 2019
QianSwirlds added a commit that referenced this issue Jul 29, 2019
QianSwirlds added a commit that referenced this issue Jul 29, 2019
@QianSwirlds
Copy link
Contributor Author

Closed by bebf7f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature P3 parser Area: File parsing
Projects
None yet
Development

No branches or pull requests

2 participants