-
Notifications
You must be signed in to change notification settings - Fork 65
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
Chainhook predicate finds 93 occurrences of contract deploys for address but there are over 200 in explorer #357
Comments
Thanks for the time spent on this @timstackblock, I think it's time for us to take on #287. |
Ok I have pushed up my test here #347 (comment) some are blocked by the corresponding bugs I found but I will comment on #287 |
I've done some digging, and I think this actually is okay! When a predicate is checked against a block, all transactions in the block are checked to see if their deployer is the one provided in the predicate. If any of the transactions match, we return the whole block and that is 1 occurrence. So, if a single block has multiple transaction deployments from the deployer, it will only count as one occurrence. However, if you inspect the actual block that is added to the file, it will have multiple transactions. Here is an example: {
"chain": "stacks",
"uuid": "a0eb4a64-c96c-4ce7-836f-1b0e004fb53f",
"name": "Stacks Testnet Contract Deployment",
"version": 1,
"networks": {
"testnet": {
"start_block": 78395,
"end_block": 78395,
"if_this": {
"scope": "contract_deployment",
"deployer": "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"
},
"then_that": {
"file_append": {
"path": "./results/stacks-testnet-contract-deployment.json"
}
}
}
}
} This block has 8 different contract deployments from the specified deployer, but it only results in one occurrence. So, though the block explorer shows many more deployments, there probably are the same amount. To check this programmatically, maybe your tests can read in the resultant file, iterate over all blocks, and count all transactions with Another interesting thing I found is that in the explorer link you shared, when you filter by contract deployer, there are some deployments by a different address. I don't know why. But if you look at the So I only actually counted 177 occurrences of a contract deployment that were actually from that address. |
Ok thanks for looking into this I will closed the issue |
Describe the bug
When running the contract deploy predicate for address ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGMI only get 93 occurences returned but I can see there are over 200 contract deploys in explorer, filter for contract deploys in the activity list below to view the data. https://explorer.hiro.so/address/ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM?chain=testnet
I was expecting all that data to be pulled in but chainhook scanned all 114982 blocks and only found 93 occurrences.
There seems to be a large amount of contract deploys missing. Here is the predicate I selected the block height 110989 of the last contract deploy so all the data would be pulled in, please let me know if there is something present in the file that needs changing and if this is a valid bug.
The text was updated successfully, but these errors were encountered: