tfchain icon indicating copy to clipboard operation
tfchain copied to clipboard

Add KV store module in GO client

Open 0oM4R opened this issue 2 years ago • 2 comments

  • Add KV store valid function in go substrate this will be used in V client

this may help https://github.com/threefoldtech/substrate-client/compare/master...implement_kvstore

0oM4R avatar Sep 07 '23 13:09 0oM4R

Is this one still relevant @0oM4R @AhmedHanafy725 Do you mean tfchain-client-go ?

sameh-farouk avatar Jun 02 '24 12:06 sameh-farouk

not sure if it's still required for the v client, but it's good to have it on the tfchain go client

AhmedHanafy725 avatar Jun 11 '24 12:06 AhmedHanafy725

WIP: After investigation, I was able to implement set/get and delete operations.

The listing of all key-value pairs had a problem that the client used in the chain doesn't support creating/listing using partial key, so couldn't list the keys in the store

Reported here: https://github.com/centrifuge/go-substrate-rpc-client/issues/300 https://github.com/centrifuge/go-substrate-rpc-client/issues/365

we will need more time to find another client or fork and update the client to support using partial keys.

Eslam-Nawara avatar Sep 12 '24 13:09 Eslam-Nawara

Work Completed

  • forked the rpc client and updated it to be able to use partial key to list all values in the store
  • updated the list function to return key-value pairs with decoded format

Eslam-Nawara avatar Sep 16 '24 14:09 Eslam-Nawara