Merged
Conversation
shargon
reviewed
Feb 5, 2021
shargon
reviewed
Feb 5, 2021
Co-authored-by: Shargon <shargon@gmail.com>
shargon
approved these changes
Feb 5, 2021
roman-khimov
reviewed
Feb 5, 2021
| public UInt256 MerkleRoot => Header.MerkleRoot; | ||
| public ulong Timestamp => Header.Timestamp; | ||
| public uint Index => Header.Index; | ||
| public byte PrimaryIndex => Header.PrimaryIndex; |
Contributor
There was a problem hiding this comment.
This simplifies things a lot, but don't we also want to have a nonce in the header? It might be useful to have for contracts.
Member
Author
There was a problem hiding this comment.
The nonce in the block is an unreliable random number, and contracts should not rely on it.
| sizeof(uint) + // Index | ||
| sizeof(byte) + // PrimaryIndex | ||
| UInt160.Length + // NextConsensus | ||
| 1 + Witness.Size; // Witness |
Contributor
There was a problem hiding this comment.
We can even keep the same header size by removing this 1.
Member
Author
There was a problem hiding this comment.
We have already discussed this before. 😆
Ashuaidehao
added a commit
to Ashuaidehao/neo-devpack-dotnet
that referenced
this pull request
Feb 7, 2021
shargon
pushed a commit
to neo-project/neo-devpack-dotnet
that referenced
this pull request
Feb 7, 2021
* sync neo-project/neo#2296 * upgrade neo
ixje
added a commit
to CityOfZion/neo-mamba
that referenced
this pull request
Apr 8, 2021
ixje
added a commit
to CityOfZion/neo-mamba
that referenced
this pull request
Apr 30, 2021
* neo-project/neo#2295 * neo-project/neo#2290 * neo-project/neo#2292 * neo-project/neo#2296 * neo-project/neo#2301 * neo-project/neo#2298 * neo-project/neo#2312 * neo-project/neo#2300 * neo-project/neo#2333 * neo-project/neo#2337 * neo-project/neo#2331 * neo-project/neo#2332 * neo-project/neo#2343 * neo-project/neo#2339 * neo-project/neo#2350 * neo-project/neo#2351 * neo-project/neo#2353 * neo-project/neo#2356 * neo-project/neo#2375 * neo-project/neo#2377 * neo-project/neo#2379 * https://github.com/neo-project/neo/pull/2392/files * neo-project/neo#2400 * audit updates * refactor and bump VM requirement
roman-khimov
added a commit
to nspcc-dev/neo-go
that referenced
this pull request
Jul 27, 2024
This is a bad one. $ ./bin/neo-go contract testinvokefunction -r https://rpc10.n3.nspcc.ru:10331 0xda65b600f7124ce6c79950c1772a36403104f2be getBlock 5762000 { "state": "HALT", "gasconsumed": "202812", "script": "AtDrVwARwB8MCGdldEJsb2NrDBS+8gQxQDYqd8FQmcfmTBL3ALZl2kFifVtS", "stack": [ { "type": "Array", "value": [ { "type": "ByteString", "value": "vq5IPTPEDRhz0JA4cQKIa6/o97pnJt/HfVkDRknd1rg=" }, { "type": "Integer", "value": "0" }, { "type": "ByteString", "value": "zFYF3LGaTKdbqVX99shaBUzTq9YjXb0jaPMjk2jdSP4=" }, { "type": "ByteString", "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" }, { "type": "Integer", "value": "1722060076994" }, { "type": "Integer", "value": "5293295626238767595" }, { "type": "Integer", "value": "5762000" }, { "type": "ByteString", "value": "LIt05Fpxhl/kXMX3EAGIASyOSQs=" }, { "type": "Integer", "value": "0" } ] } ], "exception": null, "notifications": [] } $ ./bin/neo-go contract testinvokefunction -r http://seed3.neo.org:10332 0xda65b600f7124ce6c79950c1772a36403104f2be getBlock 5762000 { "state": "HALT", "gasconsumed": "202812", "script": "AtDrVwARwB8MCGdldEJsb2NrDBS+8gQxQDYqd8FQmcfmTBL3ALZl2kFifVtS", "stack": [ { "type": "Array", "value": [ { "type": "ByteString", "value": "vq5IPTPEDRhz0JA4cQKIa6/o97pnJt/HfVkDRknd1rg=" }, { "type": "Integer", "value": "0" }, { "type": "ByteString", "value": "zFYF3LGaTKdbqVX99shaBUzTq9YjXb0jaPMjk2jdSP4=" }, { "type": "ByteString", "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" }, { "type": "Integer", "value": "1722060076994" }, { "type": "Integer", "value": "5293295626238767595" }, { "type": "Integer", "value": "5762000" }, { "type": "Integer", "value": "6" }, { "type": "ByteString", "value": "LIt05Fpxhl/kXMX3EAGIASyOSQs=" }, { "type": "Integer", "value": "0" } ] } ], "exception": null, "notifications": [] } 9 fields vs 10, notice the primary index right after the block number. Back when ac52765 initially added Ledger I've used neo-project/neo#2215 as a reference and it was correct (no primary index). But then neo-project/neo#2296 came into the C# codebase and while it looked like a pure refactoring it actually did add the primary index as well and this wasn't noticed. It wasn't noticed even when 3a4e0ca had touched some nearby code. In short, we had a completely wrong implementation of this call for more than three years. But looks like it's not a very popular one. Signed-off-by: Roman Khimov <roman@nspcc.ru>
Jim8y
pushed a commit
to neo-project/neo-devpack-dotnet
that referenced
this pull request
Aug 3, 2025
* sync neo-project/neo#2296 * upgrade neo
Jim8y
pushed a commit
to neo-project/neo-devpack-dotnet
that referenced
this pull request
Aug 18, 2025
* sync neo-project/neo#2296 * upgrade neo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.