Comments (6)
I think failure would make sense if the total gas to claim suggested by neo-python
is bigger than what the others think, but smaller shouldn't fail. A wrong total value is still an issue of course.
I have to let this one sink in for a moment. I've been working on neo3 for a while now that I have to refresh my mind on the 2.x
code base and UTXO model.
from neo-python.
I think it will be hard for me to debug anything given that it is a claim on your account. My first idea is to compare the unclaimed
returned here
neo-python/neo/Core/Blockchain.py
Line 441 in f343df6
with what the C# client would say here (make sure to not accidentally relay the transaction on the C# side)
https://github.com/neo-project/neo/blob/54d0f29c82fc38b4af7d7d2df05e4e564e7966dd/neo/Persistence/Snapshot.cs#L35
Comparing start height, end height and output value. If there is no difference there, then it must be somewhere here
neo-python/neo/Core/Blockchain.py
Line 487 in f343df6
from neo-python.
OK, I have tracked the issue down to GetSysFeeAmountByHeight
. The end block height for this transaction is 5028923
. I checked the expected fee via JSON-RPC, and it's supposed to be 307291
. The value being returned by neo-python is 27399
.
When I manually run the rest of the GAS calculation with the proper/expected value, it does result in the proper GAS amount, so this is definitely the issue.
I'm going to see if I can get a new chain DB to see if it's just my local DB being out-of-whack that's the issue.
from neo-python.
I checked a different fully sync'd neo-python chain, and it has the same issue.
@ixje, do you have a neo-python 2.0 chain you can test against? I'm just using the RPC server to quickly test:
np-api-server --mainnet --port-rpc 8099
With the JSON-RPC call:
curl -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"getblocksysfee","params":[5028923],"id":1234}' http://localhost:8099
Expecting a value of 307291
but getting a value of 27399
.
from neo-python.
@ixje, do you have a neo-python 2.0 chain you can test against?
I unfortunately have to say no. I used to have a VPS running the latest version for audit reasons but that seems to have died and I've not been able to recover it (yet). The fastest option I can think of is taking a neo-python
bootstrap 4117000 and the latest available chain.acc from NGD and using np-import
to sync back up (something like np-import -m -a -i chain.acc --datadir <root folder containing "Chains/Main/">
).
iirc the neo-python
bootstrap was made with 0.9.1
. That should be the fastest route to checking if it's a local chain issue or not.
from neo-python.
It worked! 🎉 I did a full re-sync, starting from @ixje's bootstrap, syncing with chain.acc
, and then syncing the last 200k blocks in np-prompt
(which took over a week in total 😳). The gas calculations that resulted from the full rebuild were correct and solved the issue.
Thanks, @ixje! Glad to hear neo-python had it right; once I saw your confidence that it should work, I was very hopeful that's all it would be 👍
from neo-python.
Related Issues (20)
- Circular map reference causes Python stack overflow
- Docker build exits with errors HOT 9
- Parser breaks when reading --tx-attr argument with spaces HOT 3
- Privatenet fails to initialize HOT 2
- neo-python can't sync with Neo 2.10.3 nodes HOT 1
- Deploy Neo Smart Contract at runtiime. HOT 5
- Wallet & np-api-server issues HOT 2
- BigInteger ToByteArray incompatible with neo-vm v3.0.0 HOT 1
- About NEP-5 Smart Contracts HOT 8
- docker 只有Ubuntu的吗,在centos上运行出错
- centos7下,运行np-prompt,卡顿后后,ctrl + z 退出后,再此运行np-prompt,报错 HOT 1
- 运行np-prompt后,prompt.log中报错, HOT 1
- 运行np-prompt后,没有出现NEO命令行
- Connect to node problem HOT 2
- TestNet bootstrap HOT 1
- prompt input parser parses nested lists incorrectly HOT 1
- Simple Policy Plugin HOT 6
- np-bootstrap -c configure my local sync node that haved sync and the block data is finish. HOT 1
- np-bootstrap hangs at confirm prompt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-python.