planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
506 stars 142 forks source link

`StoreLoaderAttribute.ListStoreLoaderMethods()` does not find RocksDBStore #2623

Closed tkiapril closed 1 year ago

tkiapril commented 1 year ago

On planet cli:

$ planet store block-by-index rocksdb+file:///*DIR*/9c-main-snapshot  0
Unhandled Exception: System.ArgumentException: The store URI scheme rocksdb+file:// is not supported.  See also the list of supported store URI schemes:

  URI SCHEME     PROVIDED BY
  default+file:  DefaultStore
  memory:        MemoryStore
 (Parameter 'uriString')
   at Libplanet.Extensions.Cocona.Utils.LoadStoreFromUri(String uriString) in /home/runner/work/libplanet/libplanet/Libplanet.Extensions.Cocona/Utils.cs:line 128
   at Libplanet.Extensions.Cocona.Commands.StoreCommand.BlockByIndex(String home, Int32 blockIndex) in /home/runner/work/libplanet/libplanet/Libplanet.Extensions.Cocona/Commands/StoreCommand.cs:line 83
--- End of stack trace from previous location where exception was thrown ---
   at Cocona.Command.Dispatcher.Middlewares.CoconaCommandInvokeMiddleware.DispatchAsync(CommandDispatchContext ctx)
   at Cocona.Command.Dispatcher.Middlewares.HandleParameterBindExceptionMiddleware.DispatchAsync(CommandDispatchContext ctx)
   at Cocona.Command.Dispatcher.Middlewares.HandleExceptionAndExitMiddleware.DispatchAsync(CommandDispatchContext ctx)

Also, this happens when used on other projects as well (NineChronicles.Headless.Executable.)

dahlia commented 1 year ago

Might be relevant: https://github.com/planetarium/Telescope/blob/00c04c9d164bd12021cc19e3d3b72e1ff170708e/Program.cs#L47-L51.