-
Notifications
You must be signed in to change notification settings - Fork 473
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
Implement beacon chain push withdrawals (EIP-4895) #4731
Merged
Merged
Changes from 7 commits
Commits
Show all changes
289 commits
Select commit
Hold shift + click to select a range
f364bae
More test fixes
smartprogrammer93 92f8394
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 b5f9883
Fix for init and meter
smartprogrammer93 b288926
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
MarekM25 9781b77
Make withdrawals decoding optional
rubo 7b4d460
include 4895 in chainspecParameters
MarekM25 c793652
introduce WithdrawalTimestamp
MarekM25 a783b04
Fix `PayloadAttributes` handling when null
rubo 6c7d34f
Fix withdrawals length calculation
rubo 4207577
Refactor and add checks for withdrawals for RPC methods of v1
rubo 1f1a08f
Add engine_getPayloadV2
rubo 5275510
Format whitespaces
rubo ba0219b
Refactor and remove redundant "V1"
rubo 3d09efa
started adding Enginge V2 tests - V2_processing_block_should_serializ…
MarekM25 10dcda2
formatting
MarekM25 94c17cb
formatting
MarekM25 45aae0a
Implement withdrawal root validation
rubo 6cc1089
working on tests and fixes
MarekM25 86e8f72
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 2a724f9
fix block for processing
MarekM25 56f0774
BlockValidator WithdrawalRoot
MarekM25 1224c48
Fix withdrawal trie proof validation
rubo 135b9f9
add WithdrawalApplier
MarekM25 473cd20
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 f3be3ea
Remove redundant withdrawals hash check
rubo ec2f25d
Remove withdrawal check for null
rubo b00b594
Add withdrawals test chain spec
rubo a43ca6d
Reformat whitespaces
rubo 6fd2c3d
add withdrawalApplier to blockchainProcessor
MarekM25 c0adc96
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 cd18844
add withdrawals to ExecutionPayload
MarekM25 d9e2a08
test fixes
MarekM25 ea9ff25
fix EVM.test
MarekM25 78a06d4
fix EthereumTests
MarekM25 117225f
fix Benchmarks.sln
MarekM25 37f703c
Revise withdrawals representation according to the spec and refactor
rubo 176fb16
Rename `IWithdrawalApplier` to `IWithdrawalProcessor`
rubo 0279db6
Add tests for withdrawal encoding/decoding
rubo 8751876
Rename `Recipient` to `Address`
rubo b49a1df
Reformat whitespaces
rubo d05c009
Revise withdrawals length calculation in block encoding
rubo f05fd1e
HasBody?
MarekM25 7ecaef2
Remove redundant withdrawals hash check
rubo a45ded2
fix withdrawals_test chainspec && added IReleaseSpec.WithdrawalsEnabled
MarekM25 e16253e
Fixes
smartprogrammer93 3d49cfe
Merge master
smartprogrammer93 feb997e
fix GenesisLoader
MarekM25 a29598f
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
MarekM25 3794a14
fix extra-data
MarekM25 e2c0e98
Refactor withdrawal validation by implementing `IWithdrawalValidator`
rubo e35ca06
Fix failing tests
rubo f989fce
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 1e64cc8
Reformat whitespaces
rubo 1009366
Merge Master
smartprogrammer93 7314dd5
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo d89d2ba
fix withdrawalsTimestamp
MarekM25 73ad787
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 a3824f7
temporary change validation
MarekM25 951fe85
null handling?
MarekM25 88108cf
Merging latest fix from forkId Calculation
smartprogrammer93 ddc75a5
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 54b28d2
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 c57cc7d
Applying Marek's suggestion. Not sure about this one
smartprogrammer93 e90256e
Fix Ethereum tests
smartprogrammer93 500185a
Fix test cases
smartprogrammer93 d821522
Fix benchmark build
smartprogrammer93 f3cb918
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 0807e34
Fix payload attributes validation
rubo 87b2721
Remove "V1" from `IForkchoiceUpdatedHandler` name
rubo b4b9eac
Update tests
rubo 781a11f
hack AuRa tests for now
MarekM25 a11b424
fix more tests
MarekM25 01fbe57
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
MarekM25 33c92d7
fix more tests
MarekM25 6fbc10d
fix build
MarekM25 8689463
+ fix one more tests
MarekM25 cf5a4a2
fix Synchronization tests
MarekM25 2e5d09c
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
MarekM25 9b8766c
Update tests to 0aa59689101f64cab8fa1526d9cf6e647ddba946
rubo 276225d
fixed withdrawal chainspec
MarekM25 48cb901
withdrawals block validator tests
MarekM25 7fa3505
Implement Engine API tests
rubo 46e62c8
Reformat code
rubo 0919807
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 30acb11
fix chainspec?
MarekM25 d280ddb
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 786b42c
Fix withdrawals decoding
rubo 497581a
fix chainspec timestamp
MarekM25 a535927
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 e25eaf6
Add and fix Engine API tests
rubo 4936691
Revise block decoder tests
rubo c1d98c5
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo efc5e78
Revise file headers
rubo 6736c0c
Revise file headers
rubo ab7c76e
Add missing file headers
rubo c4e398a
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 ec25ab6
fix AuRa test
MarekM25 5116555
adjusting comments
MarekM25 102535b
load genesis tests
MarekM25 d67ad62
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 6ea17ce
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 9465532
Lukasz suggestions
smartprogrammer93 aad391a
formating
smartprogrammer93 a6f34d2
Fix build
smartprogrammer93 c7d3087
withdrawals_hivetests.json + cosmetic
MarekM25 620981a
Add more unit tests
smartprogrammer93 1a35206
spacing
smartprogrammer93 a16cd0b
Try on fixing timestamp activation with same value as genesis timestamp
smartprogrammer93 f99bdec
Merge Master
smartprogrammer93 a891746
Fix gnosis and chiado ForkId Calculations
smartprogrammer93 22e3f37
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
MarekM25 efa1329
fix tests
MarekM25 5d31d9e
Cleanup and more tests
smartprogrammer93 d75143d
Janky but working solution to very rare edge case?
smartprogrammer93 115d4d2
Fix flakiness of caused by Parallelizable
smartprogrammer93 b8dfefb
adding engine tests
MarekM25 bffad26
working on more tests
MarekM25 edf75cd
add loop in test
MarekM25 fe77f93
Can_apply_withdrawals_correctly test
MarekM25 c0c6e7c
more test cases
MarekM25 f13347e
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo dc730aa
Update withdrawals hive tests configuration
rubo f1a9b18
Refactor and fix some null reference warnings
rubo 13d3115
Expose withdrawals to JSON-RPC modules
rubo dbf6994
Fix broken tests
rubo 803a9f5
Revise `ForkchoiceUpdatedHandler` string output
rubo 189a02f
fix Can_apply_withdrawals_correctly
MarekM25 b805fde
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 a258284
fix whitespaces
MarekM25 9fe7a0b
fix whitespaces
MarekM25 47f49a3
more whitespaces fixes
MarekM25 5c63f4a
work on Withdrawals_transition test cases
MarekM25 abcab04
adjust CustomSpecProvider
MarekM25 4775775
Introduce IEip1995Spec
smartprogrammer93 0dbdec0
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
smartprogrammer93 9a252d7
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo a67f7d9
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
MarekM25 94262c6
small changes in tests
MarekM25 0326564
Fix license
smartprogrammer93 26190a4
add comments
smartprogrammer93 d9c39e1
Apply Marek Suggestion
smartprogrammer93 1dd876a
Adjust Lic to Rubo
smartprogrammer93 a7bc607
Marek Suggestions
smartprogrammer93 b5aaff9
Fix
smartprogrammer93 c91da93
fix withdrawals in ChainLevelHelper
MarekM25 a40bfa7
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 da1262e
fix hive sync tests
MarekM25 e1ae154
fix?
MarekM25 a5631de
Revise withdrawals root hash encoding/decoding and its tests
rubo 494aaa1
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo a33abb8
fix PayloadAttributes ToString
MarekM25 4caf2bc
add more temp logs to investigate hive tests
MarekM25 60a10bc
more logs
MarekM25 50a38a0
revert not needed logs
MarekM25 c1a8f78
fix test
MarekM25 661c50d
ignore incorrect tests
MarekM25 8f73c7e
Fix tests broken by withdrawals decoding revision
rubo c33b706
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 5f97f90
Revise file headers
rubo c91193b
Final appraoch, removed GetSpec complexity
smartprogrammer93 85676fe
Forgotten changes
smartprogrammer93 9bfb991
Merge Master
smartprogrammer93 3bac96d
SecondsPerSlot to BlocksConfig
smartprogrammer93 78a9912
Minor + config changes
smartprogrammer93 1a454ba
Typo fix
smartprogrammer93 ebc1808
remove empty line
smartprogrammer93 1c41c4b
Move BlocksConfig to Nethermind.Config project
smartprogrammer93 4c86a4f
Benchmark build fix
smartprogrammer93 4847b22
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 4fab706
Rename `ExecutionPayloadV1` to `ExecutionPayloadV2`
rubo e55177a
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 9183250
Revise withdrawals check
rubo 452b004
Refactor tests
rubo 59743f1
Optimize withdrawals root hash decoding in block header
rubo 82f9afa
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 32e48f0
Implements ForkId tests that are ub EIP-6122
smartprogrammer93 6561ac3
Spacing
smartprogrammer93 e0e0960
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 6fc2e92
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 c5159b2
Fix build
smartprogrammer93 fe4b020
Fix ForkId Test case
smartprogrammer93 93ceb9c
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
smartprogrammer93 7869fd0
Removing 3675 and using MergeForkId Transition
smartprogrammer93 c931c3f
Final test fix
smartprogrammer93 35d7f10
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 7f7f837
Fix tests
rubo 4a7de80
Rename `ExecutionPayloadV2` to `ExecutionPayload`
rubo 5a8abd0
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 6084fe9
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo d695f4e
add one more line in Nlog (temp)
MarekM25 75b9186
Revert NLog for jsonRpc
MarekM25 ec63830
fix missing body?
MarekM25 095b5de
adjust TxPool logs
MarekM25 b24a24d
Merge branch 'fix/slotTime_to_be_in_init_config_instead_of_merge' int…
MarekM25 751eded
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 77e0ad0
Add more test cases for `BlockBodiesMessageSerializer`
rubo 00db474
Add tests for `BlockHeader.HasBody`
rubo ea6aa43
Revise `null` handling for `BlockHeader.HasBody`
rubo 3823f88
fix BlockBody empty
MarekM25 f5cf45a
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 0363da5
Merge Tracking Branch
smartprogrammer93 cb2469d
Merge Tracking Branch
smartprogrammer93 1bc58d6
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
smartprogrammer93 5a0577e
Merge branch 'master' into fix/slotTime_to_be_in_init_config_instead_…
MarekM25 50fe945
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
MarekM25 71fa0a5
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
MarekM25 9d2037c
Merge branch 'fix/slotTime_to_be_in_init_config_instead_of_merge' int…
MarekM25 6351165
cosmetic
MarekM25 dd21379
fix CI
MarekM25 a856172
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo aa3153e
Revise tests
rubo a74aaab
Update null checks with pattern matching
rubo ff5443f
Refactor block body initialization and add tests
rubo d4aba09
Revise whitespaces
rubo 8878117
cosmetic
MarekM25 6d711da
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 31ffc99
Merge branch 'master' into fix/slotTime_to_be_in_init_config_instead_…
MarekM25 8632163
Merge branch 'fix/slotTime_to_be_in_init_config_instead_of_merge' int…
MarekM25 9ff4bf9
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
MarekM25 25f696a
ForkId calculation polish (#5068)
LukaszRozmej a5a54f3
Revise Clique block production according to withdrawals rules
rubo f6a9a52
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 21c16e7
Add withdrawals to `eth_getBlockByNumber` tests
rubo f0d2f6a
SecondsPerSlot move to BlocksConfig (#4944)
smartprogrammer93 3ee9679
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
MarekM25 12b81e9
fix build
MarekM25 4bc8426
Merge branch 'master' into fix/forkId_calculation_is_wrong_after_time…
MarekM25 59408a7
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 44f80bc
Merge branch 'fix/forkId_calculation_is_wrong_after_timestamp_activat…
LukaszRozmej 933f294
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
MarekM25 24552f1
removed duplicated NSubstitute
MarekM25 724968a
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 7e804d8
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo b3cd6bc
Add missing file headers
rubo ca1d670
resolved some review comments
MarekM25 e8df266
more review comments
MarekM25 ab6cf2e
more review related changes
MarekM25 b920306
fix Benchmarks build
MarekM25 96b43d2
Refactor tests
rubo 82707e4
refactor tests - review comment
MarekM25 9fe4cb2
cosmetic
MarekM25 355be4f
Revise suggested block validation messages
rubo 8e7be8d
Refactor patricia tries
rubo a25e999
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo 8224f06
fix InvalidBlockInterceptor for Withdrawals
MarekM25 7cf5d72
Merge branch 'feature/shanghai-eip-4895-withdrawals' of https://githu…
MarekM25 cf62d5e
fix whitespaces
MarekM25 6aec41d
fix tests
MarekM25 89e1705
Merge branch 'master' into feature/shanghai-eip-4895-withdrawals
rubo c579ce8
Merge branch 'master' of https://github.com/nethermindeth/nethermind …
MarekM25 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,6 +240,7 @@ protected virtual TxReceipt[] ProcessBlock( | |
|
||
block.Header.ReceiptsRoot = receipts.GetReceiptsRoot(spec, block.ReceiptsRoot); | ||
ApplyMinerRewards(block, blockTracer, spec); | ||
ApplyWithdrawals(block, spec); | ||
|
||
_stateProvider.Commit(spec); | ||
_stateProvider.RecalculateStateRoot(); | ||
|
@@ -354,5 +355,29 @@ private void ApplyDaoTransition(Block block) | |
} | ||
} | ||
} | ||
|
||
private void ApplyWithdrawals(Block block, IReleaseSpec spec) | ||
rubo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
if (!spec.IsEip4895Enabled) | ||
return; | ||
|
||
if (_logger.IsTrace) _logger.Trace($"Applying withdrawals"); | ||
|
||
foreach (var withdrawal in block.Withdrawals) | ||
{ | ||
if (_logger.IsTrace) _logger.Trace($" {(BigInteger)withdrawal.Amount / (BigInteger)Unit.Ether:N3}{Unit.EthSymbol} to account {withdrawal.Recipient}"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about traces around withdrawals? |
||
|
||
if (_stateProvider.AccountExists(withdrawal.Recipient)) | ||
{ | ||
_stateProvider.AddToBalance(withdrawal.Recipient, withdrawal.Amount, spec); | ||
} | ||
else | ||
{ | ||
_stateProvider.CreateAccount(withdrawal.Recipient, withdrawal.Amount); | ||
} | ||
} | ||
|
||
if (_logger.IsTrace) _logger.Trace($"Withdrawals applied"); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Text; | ||
using Nethermind.Int256; | ||
|
||
namespace Nethermind.Core; | ||
|
||
/// <summary> | ||
/// Represents a withdrawal that has been validated at the consensus layer. | ||
/// </summary> | ||
public class Withdrawal | ||
{ | ||
/// <summary> | ||
/// Gets or sets the withdrawal amount as a big-endian value in units of Wei. | ||
/// </summary> | ||
public UInt256 Amount { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the withdrawal unique id. | ||
/// </summary> | ||
public ulong Index { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the withdrawal recipient address. | ||
/// </summary> | ||
public Address Recipient { get; set; } = Address.Zero; | ||
|
||
/// <summary> | ||
/// Gets or sets the validator index on the consensus layer the withdrawal corresponds to. | ||
/// </summary> | ||
public ulong ValidatorIndex { get; set; } | ||
|
||
public override string ToString() => ToString(string.Empty); | ||
|
||
public string ToString(string indentation) => new StringBuilder() | ||
.AppendLine($"{indentation}{nameof(Index)}: {Index}") | ||
.AppendLine($"{indentation}{nameof(ValidatorIndex)}: {ValidatorIndex}") | ||
.AppendLine($"{indentation}{nameof(Recipient)}: {Recipient}") | ||
.AppendLine($"{indentation}{nameof(Amount)}: {Amount}") | ||
.ToString(); | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enumerable.Empty() it should be null probably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, since Shanghai, null is invalid. Decide based on timestamp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, exactly.