Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[get_cell] get_cell is wrong #183

Closed
gpBlockchain opened this issue Jan 19, 2024 · 0 comments · Fixed by #184
Closed

[get_cell] get_cell is wrong #183

gpBlockchain opened this issue Jan 19, 2024 · 0 comments · Fixed by #184

Comments

@gpBlockchain
Copy link

gpBlockchain commented Jan 19, 2024

sync account : https://explorer.nervos.org/address/ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqfs5yk06qlum25l92rp9tuukpf39g0gtqcxcat9g

Wait for the light client sync tip number; querying get_cell returns a result that is not equal to the CKB full node.

light ret

image

full node ret

image

step:

# start ckb 
RUST_LOG=info,ckb_light_client=trace ./ckb-light-client run --config-file config/mainnet.toml

# set script : 11987550
curl --location --request POST 'http://127.0.0.1:9000' \
--header 'Content-Type: application/json' \
--data-raw '{
        "jsonrpc":"2.0",
        "method":"set_scripts",
        "params":[[{"script":{"code_hash":"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8","hash_type":"type","args":"0x30a12cfd03fcdaa9f2a8612af9cb05312a1e8583"},"script_type":"lock","block_number":"0xb6ea5e"}],"all"],
        "id":64                  
}'

# wait sync successful 
# query get_cell
curl --location --request POST 'http://127.0.0.1:9000' \
--header 'Content-Type: application/json' \
--data '{    
        "jsonrpc":"2.0",
        "method":"get_cells",  
        "params":[  { "script": {"code_hash":"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8","hash_type":"type","args":"0x30a12cfd03fcdaa9f2a8612af9cb05312a1e8583"},    "script_type": "lock"},"asc",   "0x3E8"],  "id":64}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant