neo-project / neo-node

MIT License
229 stars 223 forks source link

node: upgrade from v2.10.3 to v2.12 issue #670

Closed kaushikbpatel closed 9 months ago

kaushikbpatel commented 3 years ago

I have download the latest zip for v2.12 and then i have replaced to v2.10 folder (updated config.json and protocol.json for live mainnet) and try to start neo client peers. but it gives me error and block are not download properly.

can anyone provide proper steps to upgrade from v2.10.3 to v2.12

Getting this error on new-cli.exe rpc --nopeers [ERROR][9/23/2020 6:22:28 AM][Thread 0012][akka://NeoSystem/user/$a] Object reference not set to an instance of an object. Cause: System.NullReferenceException: Object reference not set to an instance of an object. at Neo.Ledger.Blockchain.PersistLocalStateRoot() at Neo.Ledger.Blockchain.Persist(Block block) at Neo.Ledger.Blockchain.OnNewBlock(Block block) at Neo.Ledger.Blockchain.OnReceive(Object message) at Akka.Actor.UntypedActor.Receive(Object message) at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message) at Akka.Actor.ActorCell.ReceiveMessage(Object message) at Akka.Actor.ActorCell.Invoke(Envelope envelope) [ERROR][9/23/2020 6:22:28 AM][Thread 0012][akka://NeoSystem/user/$a] Error while creating actor instance of type Neo.Ledger.Blockchain with 2 args: (Neo.NeoSystem,Neo.Persistence.LevelDB.LevelDBStore) Cause: [akka://NeoSystem/user/$a#833417567]: Akka.Actor.PostRestartException: Exception post restart (System.NullReferenceException) ---> System.TypeLoadException: Error while creating actor instance of type Neo.Ledger.Blockchain with 2 args: (Neo.NeoSystem,Neo.Persistence.LevelDB.LevelDBStore) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object. at Neo.Ledger.Blockchain..ctor(NeoSystem system, Store store) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at Akka.Actor.Props.ActivatorProducer.Produce() at Akka.Actor.Props.NewActor() --- End of inner exception stack trace --- at Akka.Actor.Props.NewActor() at Akka.Actor.ActorCell.CreateNewActorInstance() at Akka.Actor.ActorCell.<>c__DisplayClass109_0.b__0() at Akka.Actor.ActorCell.UseThreadContext(Action action) at Akka.Actor.ActorCell.NewActor() at Akka.Actor.ActorCell.FinishRecreate(Exception cause, ActorBase failedActor) --- End of inner exception stack trace ---

Show state -- in v2.10.3 is shows proper block while here is shows behind. so i do not know whats is true?

block: 6200769/6200768/6200788 state:-1 connected: 16 unconnected: 225 ip: 195.201.19.161 port: 10333 listen: 10333 height: 6200784 ip: 13.90.20.90 port: 10333 listen: 10333 height: 6200802 ip: 52.76.5.84 port: 10333 listen: 10333 height: 6200799 ip: 13.251.207.0 port: 10333 listen: 10333 height: 6200800 ip: 148.251.52.67 port: 10333 listen: 10333 height: 6200801 ip: 54.238.219.96 port: 17333 listen: 17333 height: 6200802 ip: 49.12.67.179 port: 10333 listen: 10333 height: 6200800 ip: 77.93.47.230 port: 10333 listen: 10333 height: 6200796 ip: 52.77.207.165 port: 10333 listen: 10333 height: 6200801 ip: 18.182.30.92 port: 17333 listen: 17333 height: 6200800 ip: 13.82.121.82 port: 10333 listen: 10333 height: 6200802 ip: 47.92.106.161 port: 10333 listen: 10333 height: 6200802 ip: 54.238.185.156 port: 17333 listen: 17333 height: 6200800 ip: 88.198.161.109 port: 10333 listen: 10333 height: 6200802 ip: 104.43.136.59 port: 10333 listen: 10333 height: 6200802 ip: 18.136.178.96 port: 10333 listen: 10333 height: 6200799

kokahunter commented 3 years ago

You have to re-sync the chain. If you haven't done it, this will most likely fix the issues.

You can get the full offline package for faster sync here: https://sync.ngd.network/

kaushikbpatel commented 3 years ago

I have already did that. Also as i know if the chain is already there then no need to re-sync.

I am getting error when starting the neo-cli. if i open old v.2.10 then it properly sync data to new block. Last time when i upgrade from v2.9 to v.10.3 just paster new files from zipfile. did not re-sync and then also it work prefect.

kokahunter commented 3 years ago

With this upgrade it is mandatory to re-sync the full chain, i.e. delete chain data and do a full resync. Not sure if I understood your answer correctly and if u did this.

kingli-crypto commented 3 years ago

I also encountered the same issue when resync from a clean slate

ksmith-polo commented 3 years ago

I have also experienced this issue when trying to upgrade from 2.10.3 to 2.12.1. After doing the complete chain resync I've experienced that the first 1.5M blocks sync very quickly and then after that the node is syncing at a rate that is uncharacteristically slow. In the past when doing a full resync it usually takes about 24 hours or so to resync. It has been almost 72 hours and the node is still over 3.5M blocks behind. Has anyone else experienced this and if so how have you gotten past this?

superboyiii commented 3 years ago

v2.12 is a data-uncompatible version since it added state root so that you need resync data via offline package(https://sync.ngd.network/). And the chain data will be about 100G and take much time for offline sync (4 CPU cores -> about 2 days, 8 CPU cores -> about 1 day). And SSD is necessary for your disk. Please notice this.

shargon commented 9 months ago

Old, if remains, please re-open