Comments (6)
Hmm. Interesting. I'm not exactly sure what's going wrong here, but I'll see if I can recreate the problem on my end. The internal data field has MAX_INT stored in it if the script has never been spent. When calling script.revealed_tx, it should return None if it stores MAX_INT or a transaction otherwise.
I'll describe how this works in two parts.
- Parser: This is where all the data is generated. The main class that handles this is AddressWriter(https://github.com/citp/BlockSci/blob/master/src/parser/address_writer.hpp).
The function,
template<blocksci::AddressType::Enum type>
size_t serialize(const ScriptOutput<type> &output, uint32_t txNum)
is called on each output on the blockchain. For each new output it serialized a chunk of script data described in https://github.com/citp/BlockSci/blob/master/src/blocksci/scripts/script_data.hpp. The txFirstSpent
field is initialized to std::numeric_limits<uint32_t>::max()
.
The function
template<blocksci::AddressType::Enum type>
void serialize(const ScriptInput<type> &input, uint32_t txNum, uint32_t outputTxNum)
is called on each input. On this first usage of that input, it should update the txFirstSpent
to be the index of the tx which includes that input.
- Analysis Library
https://github.com/citp/BlockSci/blob/master/src/blocksci/scripts/script.cpp contains the implementation of the getTransactionRevealed function which is called by script.revealed_tx. It checks to see whether the script has been spent. If it hasn't been spent it should return None and otherwise should return the Transaction so this should never produce.
The python library is just a thin wrapped over this so it should have the same behavior.
from blocksci.
I've done a bunch of testing an I haven't been able to recreate this issue on my end including rerunning your original query from the previous issue. I think there's a reasonable chance that this issue is gone in the current (updated) version.
from blocksci.
Hmm that must be it. I am using the AMI that u provide so maybe that is not updated to reflect the change.
from blocksci.
We just a released a new version of the AMI this morning running the latest version where everything should be working.
from blocksci.
Thanks for this. Also brilliant product and very good features! :)
from blocksci.
I'm glad people are finding it useful!
from blocksci.
Related Issues (20)
- How to filter txes within a period of time
- Is there a way to get the string for nonstandard and multis addresses HOT 5
- Can't install Blocksci failing on pip3 install HOT 1
- I'd be happy to maintain this project if you do not have the time. HOT 8
- Always Segmentation fault (core dumped) at 36xxxx/678615 block HOT 1
- blocksci_parser throws "Error while interacting with RPC" Exception
- Can anyone please tell me how to install BlockSCI step by step HOT 1
- Parsing the blockchain on Ubuntu 18.04 HOT 4
- Iterators returned by fluent interface routines reset randomly
- Address clustering heuristic in BlockSci
- std::runtime_error Abort trap: 6
- from ._blocksci import * issue
- Error. HOT 1
- BlockSci always returns empty lists, no matter which function I call HOT 3
- Any alternative to chain.address_from_string() not working, returning null for valid address strings? HOT 1
- How to modify BlockSci to capture Taproot PTTR addresses/transactions? Volunteers please! HOT 2
- CSV Export Tool
- ERROR CODE 1
- Issue with BlockSci Parser Execution
- Data base help. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blocksci.