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

After submit block, AION node has no result. #1158

Open
yrjphf opened this issue Jun 8, 2020 · 2 comments
Open

After submit block, AION node has no result. #1158

yrjphf opened this issue Jun 8, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@yrjphf
Copy link

yrjphf commented Jun 8, 2020

Description

When my pool submit a solution, node should print the log:
block submitted via api OR
Unable to submit block via api.

But it is often the case that the node does not follow.

So, the block I dug out became a orphan block.

Why does this happen? Can this problem be solved?

System Information

I'm running:

  • Which Aion version?: oan node 1.5.3
  • Which operating system?: Linux
  • Which distributor and version?: Ubuntu 18.04
  • How installed?: from release node
  • Are you fully synchronized?: yes
  • Did you try to restart the node?: yes
@AionJayT AionJayT self-assigned this Jun 10, 2020
@AionJayT AionJayT added the enhancement New feature or request label Jun 10, 2020
@AionJayT
Copy link
Collaborator

So for your case in the kernel basically only 2 scenarios could happen.

The kernel chain database just re-branching (follow the network highest chain). We can fix this issue in the next release (By returning the meaningful log)

The kernel will cache the last 64 mining block templates (we use LRU map to drop the aged block template), but it’s unlikely to happen unless the pool software is too aggressive to request the block mining info from the kernel under some misbehave settings.

@yrjphf
Copy link
Author

yrjphf commented Dec 9, 2020

After upgrading to 1.6.1, this problem became more serious.

Abnormal log:

20-12-09 09:42:06.082 DEBUG API [XNIO-1 task-25]: <request mth=[submitblock] params=["00000000000000000000000000040e2b00000033000000000000000042010000","00b37fc49c08d157a3
713c6d9ca6b18c36e105e86f98019edc83c2851e2d1b6dfc35f9d67ed6184fd2a6c4ed02570817653603fc587c3b785a5b870309713a716bbf2539b292f0a4edc92697d25c40223b8b5d012677306804e313132376eb
fe227d8e628d4e8889c8ff4f7f12891804ecbc39950f44399e9d28a3ddd9c7d9e21437534d1f232d4fd5e7d41722496f33862d97b21ceca2f4a23a3cd4a50943662f641a4fd2584f1183d06837c5e28abc055105331c
facbaa7a7dcdafd3433f0e7c01adf84c932486de3ace17276663519881e4c332d468e400b594f911c9b14e0231b45e2d0bbd1940cdc8b142921e26b5723515ff38f26540efb686c463530705f6c871d8a4e20b0a8c30
8fad8588dafd53a40e917c903e0211b474797f0d96e1f814a379e93777461a2fb085bf131651f581cf23afe35928ce13d33fc21e240966203155371768a976394e99b17ce856d9fa936c7839c34203f8c92229323f01
8b7de0ac90d04e495bc720ee8d6139dd5f38f740cf0b8d328b0ecd2a2f7e3bcf222bde4bbfccb14933529914572d205b8776efa264d67660d21b9507caab2598cb1c0ad95c7484cce1f19a4737869777cb9a2bb3ad4c
6e043d683e2f224692552a45320459f92b960f4d18d6220b6a7c5bb8696f59fd6fc050c0fa1ee16ab9d7ed43a43ad8731f4ae3d12931b47f8afd6e3ea6293fb2f4827641e9ba084844f0341870234f98ee710d05aa8b
e35e88024b8f081e6611463d7d081f6c479f815de5ad3b34470401be8f1f87acee301de8417bdac87d5710d72dd03f0e3899046e467c2ea9f68366d2e6c90bfe100b3fdd9d396c83fcee366eca9fac8870508376e6c7
ee9330ecf702860db503b886beee13694e70dfaab5bbe0747a9fcf24f347202887015f34e0723633f0eaa5d3df7fb89506041c7be119c1b46ccc80ff476dbbca71870aba29a50e2c3dbaba0d5804a6b6cd65ac85fb21
1f6efa797cba2a050b1aa886e150a92d8d816011526f6e49d3b5a94fa816533f06d3c48df328bd234fba95c8261798565f29b40d0d1376d4c14d6568a81d0da60dbd9a2cdf68b8583210176a4e1d3165dc31307d77c1
87646a49396a28044906cfbd5cc4243b58a44f346b23aad0660d5089becb7a06e9f10604d5284a696a3541b9754c71f47b5d1e46c20ccfe22d7d91a02a5d73cc25bd8b5e4ff7e16323d931168c87370e746a526ad798
4e241a5e641c7afcb647fd0c2555bb771a01d2f4406031903cf03abaa9fdba0462434cd5a3c205ccf26258184afe4dcb90183ca1fccaa024bb8f1520876a7c21231039c1e148e75c89817dd6f954e87e5e37b734f477
3b055ef3f711a54aa25d36f9f716d0671f758e8f523d9a4251bf4604490a6f83b651301b60096ee4a60d17acbbca208b049ac312bc513029e12586fe8116d880f3ec8058318eaa5cc38965b63bda332acfe0ecb926e0
71ab8b9332b35afb3494a852ff6bcc05e42877e87301bb1bd7b22a3c099e12881fbfbafef106a405d703893f1a3ad4806cbb96a923c9198037f4ae1c80fe8c9a953af16e799b88157e5f28fa8c2e2c4895218d839def
fc9e3ebf2d3f59fe1e8d8005c4199dd21a0d8de17f6c37f5296f488d82a69aef78c8f318ffddfb516fc6a8bb8cce22b77affb4e19ada8f9d5fe4fc25d93a6899b45ab8ca9a2b8555426832b55a69036334694b50f9ff
67037ce37c79d5a7af32afc70b8cb494bf047609bccf6d00b9fb2835c82655833ee81845aa6ded61c6333b4d7e1806c3f43407e3443d73e5b7578b98b3ae09236f265075979a09f50a719216a64f3edd160ef5a3c64b
dfaabe9868fc1f2a751f52f0f39d97dc3f967236650d6d69dc968a8b75b57ea5588131aab2fc650d7bea5e2bc6795562667e40ee543c43b6a59295f56f31a41e0024cdb2d25d64732753c32658735be93395d2166753
187097ba55f64acb5eb0e3b983e682d17e5f911bfeb510","0fd63743e64d898406b51e454975721f0dd1fe7fcd73191377cb046cc106c8fa","000000005fd09bec"]>
20-12-09 09:42:06.082 DEBUG API [XNIO-1 task-25]: <request mth=[submitblock] rpc-process time: [35.56 μs]>

Normal log:

20-12-09 09:59:32.469 DEBUG API [XNIO-1 task-9]: <request mth=[submitblock] params=["000000000000000000000000000452b00000005a000000000000000076020000","001fefdf9ba48500a0d
a9b2613ef95eda27fa0e744be2525159d2429b7b0f170fe9a35ef83da7acc142e420a00f01edcfcc3b09a790eaf5e25b34794ee93387a58182256da7f8fc35daa1dcf73427b093690b65cde625287062da6412043a71
73d084321f007bde5064edb28e3b20ade5f0403b2355319f7a739779e92cd561988616a7c0ea899288a764af4ae390916bba6fab5c19ebe20556d1a24c9e6f7c7ea4ab60c7b5a30e1b555c6e58febec62006c784989f
7b1d822c8f205034f73dfb4b81dd6af123ec1dae7e144cb825bf0a4952a9b8601ca6172755a410548dd1be2e7f11f6a2387176fb8a797f2ddd4b648551147494278887a6e299f08121babb8b0d83cc27cb4ef0493338
fe6fa32e87ad7144cc4214cc3f5be586864b607737d5feb80999f09460523c14bd2c237dff327a2f30990cf84e2e589e6ba21276620af5a84ded1543ed8a50f8e3bcd8df11909d2b62138fdf2a30f78f67ee5d124059
d215f8c21d7948840ce102d013bdff5785f7dcda02453ed31890f4b74ff52952f1e7a1220560b7ce0deb451678688a978dc14ef9e605d0c5a151156ce612ea8c8808faea1e699790331edf1a46b0afc47bc016079587
709ae767570a393959f63ca0ec75955437d5377bd447c118e2970b5b45985eec13a6472ca770c29de3ca9258c155f99af4d43a211ab9feb6beaa5fce80a1671b86e0e269a1b534013db52d9c22b7e074a7363ba7ef83
41f8c087cbdb2ed01725e6c6fd61c9415092c8391783ffd5a18bc7eb0001bdce93524a519085a31625557fd2ac8160daefa414895d9af2493cf412a1bd9a2ca8660b07209480ba1e13196c48973fc1e54947154eece1
a82fadd610a7f72b808f27d2d7111e746d14eeb31d6a669dcd05d267c4f3b20b51c5ab489388bec2e92096a80da73284d0c2e6434dc2d08f0fa26af4820e2ae7cc728ab777dc73d52a9b41789f1b66a348343a649eca
9c4452d3bb8af014a37da7fa08f5cdac0f6120045bad74275b0ea553f10913dcbb332a082cf83784bb74136278607699ba7e808bf3f72c6a4355b2482490d5fce45d3d7eac6f00f6a1a400d1ffa484b542698b424db7
3b0972846dc68ecf408079a18dfa2f201d7779936c5a7805c6ac105f3ccdb1a8ab5ac2459685b31c98b5307557b3c670ccceaa4e30dc070be17999bb9f8bc541675879e04e2d2b6a5bad70efec1fe7a320edff0ba414
1b6724e8616e2485e3f6e06a3da9dcba1ddb25fcba33f2f1d45e6c701bbedbb1e26c0d89d9fd911a5b8499c3ad22a6153643e9af99e3b201f75c532ce5f213e94d8923f77f2fa79919a37f36d29ed64bc6786ef87610
6a42e7dab8f003c4f613f3e17088b56ea9795ffd46452fe212a5eb8944d57fd7d80016b877a68f06c54757bea6183518a5f992b5992ad8e5b127c9fb2cc1150ddad0b837f03227f4fdbd2d86fcb911f1a9b70369b939
63d18c7329f7f32664864c267bd370165d600e8fe4580fbdf25484953424335062522d3601065ea46c4077f77e3c9d1172d05a49cb9a6e4369ea604f86e0f8df266855787695e5d0e3347d62989364f81255e4e8ac68
35ab0f869eca08d6bb758fa7df0f7fe4805fd85ffa2a36ab62ad7a90607dd895e9d62607e92130ba716fa974482bf126f8344f8da5732346347be77cb0ca5d85ea7a4c4ebbf2d91179255886ee5b7f2a1bcc00f95a8d
f0b651cb5db135b27c79ccf80eba56a37582301a131687ee222e10da673094ca58a35ba22a26d7a4f11d6a3eb52081eafe497882eb7affe691896a92638c3041001cd510274033cbb786e0ba64523374f2f790d442bb
b3a7f4db7b675387e3540d275d4eed5c8efa5bb0d13c07f8558ccb323b7bfa7356da27280cd9561795dc0282d5e59bcdb2f586d782f2bb8551dae2791bef4b65d3463b1cd9314e7aba9ad2c7eb3abf0eb98c70068e18
b49360f86abc658c37d11b6656b51cdb4b94a0db7a36a","1b20df322ac9f8774256fe7a925dac1ba4bb742329a30035039065498e8280a7","000000005fd0a004"]>

20-12-09 09:59:32.469 INFO API [XNIO-1 task-9]: Unable to submit block via api <num=7387860, hash=d565be, diff=9624550, tx=0>

20-12-09 09:59:32.469 DEBUG API [XNIO-1 task-9]: <request mth=[submitblock] rpc-process time: [531.2 μs]>

After submit_block, the result should be returned:

Unable to submit block

OR

block submitted via api

But, often there are neither of these.

I looked at the source code of node, the function is:
modApiServer/src/org/aion/api/server/rpc3/AionChainHolder.java
Line 191:

public boolean submitBlock

Neither logSealedBlock nor logFailedSealedBlock is executed, but it returns true.

So why does this happen? Can this problem be solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants