Skip to content

Autoinstall storage provider#4273

Closed
ajara87 wants to merge 10 commits intoneo-project:masterfrom
ajara87:autoinstall-storage-provier
Closed

Autoinstall storage provider#4273
ajara87 wants to merge 10 commits intoneo-project:masterfrom
ajara87:autoinstall-storage-provier

Conversation

@ajara87
Copy link
Member

@ajara87 ajara87 commented Nov 4, 2025

Description

To avoid error "Can't find the storage provider LevelDBStore (Parameter 'storageProvider')" which happend when LevelDBStore are not located in Plugins. This PR try to auto-install storage prover if it's not available at method start of MainService.

It should be noted that if you publish locally neo-cli, plugins are removedand and try to run then the storage provider auto-install can be the released one and can be different from local version, showing up an error like "Unhandled exception. System.TypeLoadException: Method 'add_OnNewSnapshot' in type 'Neo.Plugins.Storage.Store' from assembly 'LevelDBStore, Version=3.8.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation." in case something is different between both versions.

Change Log

  • Modify MainService.cs

Fixes #4270

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit Testing
  • Run Application
  • Local Computer Tests
  • No Testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ajara87 ajara87 requested a review from shargon November 4, 2025 22:41
@vncoelho
Copy link
Member

vncoelho commented Nov 4, 2025

To avoid error "Can't find the storage provider LevelDBStore (Parameter 'storageProvider')" which happend when LevelDBStore are not located in Plugins. This PR try to auto-install storage prover if it's not available at method start of MainService.

Just notice that the LevelDb is indeed in the folder and it is there. THe cause of the error is not the missing plugin.
But the problem can be multiple and just appear now with the other root problem.

@superboyiii
Copy link
Member

#4270 (comment) We're not in this case.

@shargon
Copy link
Member

shargon commented Nov 5, 2025

#4270 (comment) We're not in this case.

No, but it could be useful

shargon
shargon previously approved these changes Nov 5, 2025
@erikzhang
Copy link
Member

Which plugin does it install automatically?

@ajara87
Copy link
Member Author

ajara87 commented Nov 5, 2025

Which plugin does it install automatically?

if LevelDB (or RocksDB depending on your configuration) is configured but not installed it will be installed automatically

@Jim8y Jim8y added the Port-to-3.x Feature or PR must be ported to Neo 3.x branch label Nov 8, 2025
Jim8y
Jim8y previously approved these changes Nov 8, 2025
@ajara87 ajara87 dismissed stale reviews from Jim8y and shargon via a75d2f6 November 9, 2025 10:01
@shargon
Copy link
Member

shargon commented Nov 10, 2025

Is this ported to neo-project/neo-node#910 ?

@erikzhang
Copy link
Member

Is this ported to neo-project/neo-node#910 ?

No. Unmerged changes are not ported.

@shargon
Copy link
Member

shargon commented Nov 11, 2025

Please @ajara87 move this changes to neo-node repo

@shargon shargon closed this Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Port-to-3.x Feature or PR must be ported to Neo 3.x branch Waiting for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugins Loading issue

6 participants