Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Account page includes accounts that do not exist #404

Closed
bowenwang1996 opened this issue Sep 1, 2020 · 5 comments
Closed

Account page includes accounts that do not exist #404

bowenwang1996 opened this issue Sep 1, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@bowenwang1996
Copy link

https://explorer.near.org/accounts includes accounts that do not exist. For example, hentamain does not exist.

@bowenwang1996 bowenwang1996 added the bug Something isn't working label Sep 1, 2020
@icerove
Copy link
Contributor

icerove commented Sep 1, 2020

let me check first

@icerove
Copy link
Contributor

icerove commented Sep 1, 2020

In the database, it actually seems like correct :
image

but I check the transaction 2cPeiC5WXitfECYRyzGXPwEgQjcrHLJJ6zqZCjmYG5tb, it is like this:

{
"id": "dontcare",
"jsonrpc": "2.0",
"result": {
"receipts_outcome": [
{
"block_hash": "AFoM8jp87YUi6CRkzBD5A8hxvmJR5MDh4QVaqc81ACBk",
"id": "9fGjxZec7uwYJtY1NibXG85eAKQhWAcVT2svVKmCmRZw",
"outcome": {
"executor_id": "hentamain",
"gas_burnt": 207666875000,
"logs": [],
"receipt_ids": [
"84Bv6SXAoFzZvycwrV89aNbuFN5prWfGTJViGkR6FnhZ",
"Apy2HsAG4hNevCqYBiZzZP6zHviVFFhRPXtEjBc8Ugpe"
],
"status": {
"Failure": {
"ActionError": {
"index": 0,
"kind": {
"CreateAccountOnlyByRegistrar": {
"account_id": "hentamain",
"predecessor_id": "hentatest.near",
"registrar_account_id": "registrar"
}
}
}
}
},
"tokens_burnt": "20766687500000000000"
},
"proof": []
},
{
"block_hash": "GFScy25StDPwTNWAnG5ooa6KKUPw3XjTu8wgbi2HNroK",
"id": "84Bv6SXAoFzZvycwrV89aNbuFN5prWfGTJViGkR6FnhZ",
"outcome": {
"executor_id": "hentatest.near",
"gas_burnt": 0,
"logs": [],
"receipt_ids": [],
"status": {
"SuccessValue": ""
},
"tokens_burnt": "0"
},
"proof": [
{
"direction": "Right",
"hash": "Hfw6xfLkfpTUJnTFmeFwu4Z2pVyDYzC23vqeCYqewTX1"
}
]
},
{
"block_hash": "GFScy25StDPwTNWAnG5ooa6KKUPw3XjTu8wgbi2HNroK",
"id": "Apy2HsAG4hNevCqYBiZzZP6zHviVFFhRPXtEjBc8Ugpe",
"outcome": {
"executor_id": "hentatest.near",
"gas_burnt": 0,
"logs": [],
"receipt_ids": [],
"status": {
"SuccessValue": ""
},
"tokens_burnt": "0"
},
"proof": [
{
"direction": "Left",
"hash": "BgfFiRBPHZeP54qzua2Q71NHjAMwfJjiquqGTBsMRkRm"
}
]
}
],
"status": {
"Failure": {
"ActionError": {
"index": 0,
"kind": {
"CreateAccountOnlyByRegistrar": {
"account_id": "hentamain",
"predecessor_id": "hentatest.near",
"registrar_account_id": "registrar"
}
}
}
}
},
"transaction": {
"actions": [
"CreateAccount",
{
"Transfer": {
"deposit": "10000000000000000000000000"
}
},
{
"AddKey": {
"access_key": {
"nonce": 0,
"permission": "FullAccess"
},
"public_key": "ed25519:FVmjjmx1XqT5s35rs931dXADGJ2votwWoL9NqVWgi2xj"
}
}
],
"hash": "2cPeiC5WXitfECYRyzGXPwEgQjcrHLJJ6zqZCjmYG5tb",
"nonce": 4,
"public_key": "ed25519:7XrwqsooLejUf3LLU4KAGL67c8d1LSCtX297sSXaVBzN",
"receiver_id": "hentamain",
"signature": "ed25519:5YNreVnPpCL35oKrKTjZDB1EqARsxZJ28fzLFYDTdGQjo4cNRMmb7KhkJBd2TJSmKqTCfcUMHefmrRMZXgn5rnq9",
"signer_id": "hentatest.near"
},
"transaction_outcome": {
"block_hash": "DzA5T9xeCkPTnmPoAWjCFL3Pd4hBhuWVCwqpdg287DQe",
"id": "2cPeiC5WXitfECYRyzGXPwEgQjcrHLJJ6zqZCjmYG5tb",
"outcome": {
"executor_id": "hentatest.near",
"gas_burnt": 424555062500,
"logs": [],
"receipt_ids": [
"9fGjxZec7uwYJtY1NibXG85eAKQhWAcVT2svVKmCmRZw"
],
"status": {
"SuccessReceiptId": "9fGjxZec7uwYJtY1NibXG85eAKQhWAcVT2svVKmCmRZw"
},
"tokens_burnt": "42455506250000000000"
},
"proof": []
}
}
}

@icerove
Copy link
Contributor

icerove commented Sep 1, 2020

I think I know why, we do not have receipts table and also do not check status before inserting into database. So it is scam but we could not deal with it now. @frol

@bowenwang1996
Copy link
Author

In the case where the account is created through a transaction, you can check the final status of the transaction to see whether it succeeded or not. I understand that we still cannot track the accounts created through function calls, but I think we can at least make sure we don't display accounts that do not exist.

@frol
Copy link
Collaborator

frol commented Sep 2, 2020

It is a duplicate of #223

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants