Closed OnedgeLee closed 1 year ago
Investigating on
FAIL Libplanet.Tests.Blockchain.BlockChainTest.TipChanged: 0.2815928s
Libplanet.Blocks.InvalidBlockSignatureException: The block #1 #b32f85ecda73a8e2195b98147b9bb08188a058ae2859e1e5c7da95653ece1a58's signature is invalid.
Public key: 02e8c66b6a1d25eb5bf5c2d6d92cb95f98a37781e801c64505bc6b4aba74fbec54
Invalid signature: 3045022100d7de7b1320f46217197c196e5d6ebf23541896b27f3388848d4e210cd80885a802201f4e6b60878815fcfdf1aa11ec0ef96e91b0ee674966c60ca8f2f02e4e9af0e8
at Libplanet.Blocks.BlockHeader..ctor (Libplanet.Blocks.PreEvaluationBlockHeader preEvaluationBlockHeader, System.ValueTuple`3[T1,T2,T3] proof) [0x00091] in /mnt/ramdisk/Libplanet/Blocks/BlockHeader.cs:83
at Libplanet.Blocks.Block`1[T]..ctor (Libplanet.Blocks.PreEvaluationBlock`1[T] preEvaluationBlock, System.ValueTuple`3[T1,T2,T3] proof) [0x00006] in /mnt/ramdisk/Libplanet/Blocks/Block.cs:90
at Libplanet.Blocks.PreEvaluationBlock`1[T].Sign (Libplanet.Crypto.PrivateKey privateKey, Libplanet.HashDigest`1[T] stateRootHash) [0x0000e] in /mnt/ramdisk/Libplanet/Blocks/PreEvaluationBlock.cs:197
at Libplanet.Blocks.PreEvaluationBlock`1[T].EvaluateActions (Libplanet.Crypto.PrivateKey privateKey, Libplanet.Blockchain.BlockChain`1[T] blockChain) [0x0001b] in /mnt/ramdisk/Libplanet/Blocks/PreEvaluationBlock.cs:308
at Libplanet.Blockchain.BlockChain`1+<MineBlock>d__85[T].MoveNext () [0x00342] in /mnt/ramdisk/Libplanet/Blockchain/BlockChain.MineBlock.cs:200
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at Libplanet.Blockchain.BlockChain`1+<MineBlock>d__84[T].MoveNext () [0x000f2] in /mnt/ramdisk/Libplanet/Blockchain/BlockChain.MineBlock.cs:59
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at Libplanet.Tests.Blockchain.BlockChainTest+<TipChanged>d__67.MoveNext () [0x000b0] in /mnt/ramdisk/Libplanet.Tests/Blockchain/BlockChainTest.cs:1930
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <a1e9f114a6e64f4eacb529fc802ec93d>:0
at Xunit.Sdk.AsyncTestSyncContext+<>c__DisplayClass7_0.<Post>b__1 (System.Object _) [0x00000] in <0350163fda644960871a084e928b71dc>:0
First I suspect that xunit-unity-runner that CI executes has some problem on parallel test excution(fixture mixing or sth), but it seems not, since signature generation and verification is happend on same method, sequentially.
public Block<T> Sign(PrivateKey privateKey, HashDigest<SHA256> stateRootHash)
{
ImmutableArray<byte> sig = Header.MakeSignature(privateKey, stateRootHash);
return new Block<T>(
this, (stateRootHash, sig, Header.DeriveBlockHash(stateRootHash, sig)));
}
So, now I'm suspecting problem on mono build. I'll perform tests on mono build, using dotcover.
This issue will be handled as below process:
For test skipping by [SkippableFact]
, [SkippableTheory]
, test class skipping cannot be accomplished.
I've tried to find some way, but it doesn't seem there're some way that is quite easy.
(https://github.com/xunit/xunit/issues/791)
So, I've decided to apply class skipping on CI.
It's just temporary, since those tests will be fixed within spring.
Some of unity tests are flaky due to invalid signature, and need to be fixed.