Pages:
Author

Topic: Hashmal - Transaction Script IDE (alpha) - page 2. (Read 9192 times)

member
Activity: 89
Merit: 21
September 03, 2015, 03:35:08 AM
#9
Nice idea OP. Thanks for your contribution to the community.
hero member
Activity: 546
Merit: 500
Warning: Confrmed Gavinista
September 03, 2015, 03:07:40 AM
#8
Well done, this looks really good. I think you are going in the right direction with this.  Wink
legendary
Activity: 2576
Merit: 1186
September 03, 2015, 02:33:38 AM
#7
Would be nice if it could use libbitcoinconsensus for evaluation just to avoid any potential bugs.
I recall one time when Valgrind messed up an x86 instruction, it totally confused my debugging efforts for hours. Sad
... and that was without money at stake ... :|

Disclosure: Shameless try-to-build-demand for reopening Bitcoin Core pull request #6178, "Refactor EvalScript into a CScriptExecution class, so single-stepping can be done"

I hadn't thought of that. It's a good idea, albeit one that would complicate starting Hashmal (e.g. compiling the C++ extension). The current method of stepping through scripts - via re-implementing EvalScript() from python-bitcoinlib - is rather inelegant. I'm also relatively unfamiliar with C++ (as opposed to C) extensions in Python. Anyway, there probably should be a better implementation of script evaluation, so that's currently the only option on the table.
libbitcoinconsensus, while it does use C++, exports only a C API Smiley
Should be able to just use ctypes I would think (with stock libbitcoinconsensus lib).
(Of course, this only works with #6178 merged Sad)
member
Activity: 64
Merit: 20
September 03, 2015, 02:15:39 AM
#6
Would be nice if it could use libbitcoinconsensus for evaluation just to avoid any potential bugs.
I recall one time when Valgrind messed up an x86 instruction, it totally confused my debugging efforts for hours. Sad
... and that was without money at stake ... :|

Disclosure: Shameless try-to-build-demand for reopening Bitcoin Core pull request #6178, "Refactor EvalScript into a CScriptExecution class, so single-stepping can be done"

I hadn't thought of that. It's a good idea, albeit one that would complicate starting Hashmal (e.g. compiling the C++ extension). The current method of stepping through scripts - via re-implementing EvalScript() from python-bitcoinlib - is rather inelegant. I'm also relatively unfamiliar with C++ (as opposed to C) extensions in Python. Anyway, there probably should be a better implementation of script evaluation, so that's currently the only option on the table.

First POST and OP congratulations because you just solved a problem that every Bitcoin developer of the past few years has grappled with. I'm definitely going to be checking this out.

Edit: seems like an easy improvement to this is add another field for raw transactions to check that the TX is valid and to inspect the script works as intended. I just noticed what you wrote about multi-sig but should be quite easy to code this (pybitcoin-lib already has all the code.)

Thanks! The thing about CHECKSIG is that the Stack View tool was getting pretty crowded so I didn't put in any way to include a transaction. But you're definitely right in that it wouldn't be very difficult to do. I think the best way to accomplish that is to create a tool called "Transaction Deserializer" or some such, and have it be able to interact with the Stack View tool. I'll give that a shot.

Oh man, where were you 2 years ago when I was getting started? I'm wishing good things for this project  Smiley

Thanks for the good wishes. Smiley
member
Activity: 114
Merit: 16
September 02, 2015, 11:17:10 PM
#5
First POST and OP congratulations because you just solved a problem that every Bitcoin developer of the past few years has grappled with. I'm definitely going to be checking this out.

Edit: seems like an easy improvement to this is add another field for raw transactions to check that the TX is valid and to inspect the script works as intended. I just noticed what you wrote about multi-sig but should be quite easy to code this (pybitcoin-lib already has all the code.)

Thanks! The thing about CHECKSIG is that the Stack View tool was getting pretty crowded so I didn't put in any way to include a transaction. But you're definitely right in that it wouldn't be very difficult to do. I think the best way to accomplish that is to create a tool called "Transaction Deserializer" or some such, and have it be able to interact with the Stack View tool. I'll give that a shot.

Oh man, where were you 2 years ago when I was getting started? I'm wishing good things for this project  Smiley
legendary
Activity: 2576
Merit: 1186
September 02, 2015, 10:52:36 PM
#4
Would be nice if it could use libbitcoinconsensus for evaluation just to avoid any potential bugs.
I recall one time when Valgrind messed up an x86 instruction, it totally confused my debugging efforts for hours. Sad
... and that was without money at stake ... :|

Disclosure: Shameless try-to-build-demand for reopening Bitcoin Core pull request #6178, "Refactor EvalScript into a CScriptExecution class, so single-stepping can be done"
member
Activity: 64
Merit: 20
September 02, 2015, 10:36:44 PM
#3
First POST and OP congratulations because you just solved a problem that every Bitcoin developer of the past few years has grappled with. I'm definitely going to be checking this out.

Edit: seems like an easy improvement to this is add another field for raw transactions to check that the TX is valid and to inspect the script works as intended. I just noticed what you wrote about multi-sig but should be quite easy to code this (pybitcoin-lib already has all the code.)

Thanks! The thing about CHECKSIG is that the Stack View tool was getting pretty crowded so I didn't put in any way to include a transaction. But you're definitely right in that it wouldn't be very difficult to do. I think the best way to accomplish that is to create a tool called "Transaction Deserializer" or some such, and have it be able to interact with the Stack View tool. I'll give that a shot.
member
Activity: 114
Merit: 16
September 01, 2015, 06:40:51 PM
#2
First POST and OP congratulations because you just solved a problem that every Bitcoin developer of the past few years has grappled with. I'm definitely going to be checking this out.

Edit: seems like an easy improvement to this is add another field for raw transactions to check that the TX is valid and to inspect the script works as intended. I just noticed what you wrote about multi-sig but should be quite easy to code this (pybitcoin-lib already has all the code.)
member
Activity: 64
Merit: 20
September 01, 2015, 06:25:16 PM
#1
Hashmal
Transaction Script IDE (Github | IRC)

Hashmal is an IDE for Bitcoin transaction scripts. Its purpose is to make it easier to write, evaluate, and learn about transaction scripts. There are very few tools that help people learn about how transaction scripts work; hopefully Hashmal can do this.

Demonstration of stack evaluation.

Hashmal is intended for cryptocurrency developers and power users. It uses python-bitcoinlib for most of its functionality.

Key Features

  • Write scripts in human-readable form.
  • Observe the stack as scripts are executed.
  • See explanations of script operations as they are evaluated.

Notice

Hashmal is a project in its infancy. Please be careful if you intend to use any scripts you make in Hashmal with an actual blockchain. This is alpha software.

You can download Hashmal from Github.
Pages:
Jump to: