-
Notifications
You must be signed in to change notification settings - Fork 208
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
Remove timestamp field from block header #2225
Comments
why not remove it and save some bytes per stored tx? |
Hi, Is this issue available? If so I would like to try working on this. |
@avive Removing the field is what this issue is about, see title. @krishnaindani Sure! Feel free to submit a pull request. |
Thanks @noamnelke . I will get started and submit the pr |
Yes, looks that way. |
Just wanted to cross check. Thanks. I have created the pr. |
I have added a PR for this issue. Can someone check if the PR looks good or if I need to update anything there? Thanks in advance. |
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation <!-- Please mention the issue fixed by this PR or detailed motivation --> Closes #2225 <!-- `Closes #XXXX, closes #XXXX, ...` links mentioned issues to this PR and automatically closes them when this it's merged --> ## Changes Remove Timestamp field from the BlockHeader struct ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [ ] Explain motivation or link existing issue(s)(#2225) - [ ] Test changes and document test plan - [ ] Update documentation as needed
## Motivation Closes #2225 (obsoletes #2231) ## Changes Remove `Timestamp` field from the `BlockHeader` struct. ## Test Plan Unit tests have been updated and all pass consistently. System tests should be unaffected and will be run. ## DevOps Notes - [x] Does this code require configuration changes? ❌ - [x] Does this code affect public APIs? ❌ - [x] Does this code assume a new version of external services (PoET, elasticsearch, etc.) ❌ - [x] Does this code make changes to log messages that our monitoring infrastructure may rely on? ❌ Co-authored-by: Noam Nelke <noamnelke@gmail.com> Co-authored-by: Lane Rettig <lanerettig@gmail.com>
## Motivation Closes #2225 (obsoletes #2231) ## Changes Remove `Timestamp` field from the `BlockHeader` struct. ## Test Plan Unit tests have been updated and all pass consistently. System tests should be unaffected and will be run. ## DevOps Notes - [x] Does this code require configuration changes? ❌ - [x] Does this code affect public APIs? ❌ - [x] Does this code assume a new version of external services (PoET, elasticsearch, etc.) ❌ - [x] Does this code make changes to log messages that our monitoring infrastructure may rely on? ❌ Co-authored-by: Noam Nelke <noamnelke@gmail.com> Co-authored-by: Lane Rettig <lanerettig@gmail.com>
## Motivation Closes #2225 (obsoletes #2231) ## Changes Remove `Timestamp` field from the `BlockHeader` struct. ## Test Plan Unit tests have been updated and all pass consistently. System tests should be unaffected and will be run. ## DevOps Notes - [x] Does this code require configuration changes? ❌ - [x] Does this code affect public APIs? ❌ - [x] Does this code assume a new version of external services (PoET, elasticsearch, etc.) ❌ - [x] Does this code make changes to log messages that our monitoring infrastructure may rely on? ❌ Co-authored-by: Noam Nelke <noamnelke@gmail.com> Co-authored-by: Lane Rettig <lanerettig@gmail.com>
## Motivation Closes #2225 (obsoletes #2231) ## Changes Remove `Timestamp` field from the `BlockHeader` struct. ## Test Plan Unit tests have been updated and all pass consistently. System tests should be unaffected and will be run. ## DevOps Notes - [x] Does this code require configuration changes? ❌ - [x] Does this code affect public APIs? ❌ - [x] Does this code assume a new version of external services (PoET, elasticsearch, etc.) ❌ - [x] Does this code make changes to log messages that our monitoring infrastructure may rely on? ❌ Co-authored-by: Noam Nelke <noamnelke@gmail.com> Co-authored-by: Lane Rettig <lanerettig@gmail.com>
## Motivation Closes #2225 (obsoletes #2231) ## Changes Remove `Timestamp` field from the `BlockHeader` struct. ## Test Plan Unit tests have been updated and all pass consistently. System tests should be unaffected and will be run. ## DevOps Notes - [x] Does this code require configuration changes? ❌ - [x] Does this code affect public APIs? ❌ - [x] Does this code assume a new version of external services (PoET, elasticsearch, etc.) ❌ - [x] Does this code make changes to log messages that our monitoring infrastructure may rely on? ❌ Co-authored-by: Noam Nelke <noamnelke@gmail.com> Co-authored-by: Lane Rettig <lanerettig@gmail.com>
Description
The block header contains a
Timestamp
field, which is set, but never read.It’s problematic to use it anywhere since it’s un-vetted, one can plaster any timestamp that serves them onto anything.
Since we’re not doing anything with this field we may as well call it “arbitrary 8 bytes that the miner can fill with whatever they please”.
Affected code
go-spacemesh/common/types/block.go
Lines 124 to 133 in f76c8b9
The text was updated successfully, but these errors were encountered: