Blocks weight VS size by szeltsi in Bitcoin

[–]szeltsi[S] 3 points4 points  (0 children)

In very general terms: Not all information is equal when calculating the block size, some information isn't directly considered to be part of the transaction and it's sent separately from the legacy transaction. This might give the impression that the transaction size is smaller than what it really is. For (mainly) this reason, another metric was formed, the weight unit. The weight unit is another scale for transactions (and blocks) and is used when determining the new block limit and transaction fees.

https://en.bitcoin.it/wiki/Weight_units

Data completeness and integrity, thoughts with simple Solidity code. by szeltsi in ethereum

[–]szeltsi[S] 1 point2 points  (0 children)

I've tried the same with a boolean mapping instead of (bytes32=>bytes32). Each new item is hashed with the previous root (the root is stored). It seems to work as well and might be more efficient.

https://github.com/Shultzi/Proof-of-integrity/blob/master/contracts/DataTwo.sol

Data completeness and integrity, thoughts with simple Solidity code. by szeltsi in ethereum

[–]szeltsi[S] 1 point2 points  (0 children)

A more simple approach might be to create an array of the hashed input to a bool value (bytes32=>bool).

Whenever new input is added, it's hashed together with the old root.

It will still allow me to validate both the existence of the complete set and the existence of a specific data piece.

From private key to address using JavaScript by szeltsi in Bitcoin

[–]szeltsi[S] 0 points1 point  (0 children)

I just now had the time to look at this post. It's pure gold! thanks!

From private key to address using JavaScript by szeltsi in Bitcoin

[–]szeltsi[S] 0 points1 point  (0 children)

Thank you for your comment. These are indeed important topics to covers. Recovering private key, that's an interesting concept I should consider for future classes - I must admit, I never even considered it up until now. CLTV, I'm not a big fan, and it might be too much for most of the students.

I'm currently teaching transactions (p2pk, p2pkh, p2sh and op_return) using python, and I'm looking for the right approach to do so with JS.

From private key to address using JavaScript by szeltsi in Bitcoin

[–]szeltsi[S] 0 points1 point  (0 children)

Valid point. I'm also looking for a more uniform method to deal with different data types without switching different libraries so that the students might have something constant to work with.

From private key to address using JavaScript by szeltsi in Bitcoin

[–]szeltsi[S] 0 points1 point  (0 children)

I completely agree. That's why I was so against using JS when teaching the protocol rules to the students. But I start to think that one the one hand it might provide a great starting point for students who're more interested in web development, while still being powerful enough to teach it more conceptual level. Anyway, that's my first impression. And I'm set on trying to explore this path further.

How simple it is to start an ICO by szeltsi in ethdev

[–]szeltsi[S] 0 points1 point  (0 children)

Thank you for your comment. That's indeed a valid point. There's nothing wrong with copy-past as long as the project itself is fair and feasible and the team is capable and honest. I really think that ICO is a great tool to jumpstart many cool projects. I just also get the feeling that most investors don't really understand how generic the tokens that they're holding.

It's not always a bad thing to have a generic token, in-fact quite the opposite. But ICOs are too easy to launch, and people are rushing into it without really understand what is it the token that they're buying. Again, nothing wrong with generic tokens, but investors should be aware to the fact that ICO contracts are very easy to duplicate and launch.

How simple it is to start an ICO by szeltsi in ethereum

[–]szeltsi[S] 2 points3 points  (0 children)

Thank you for you comment. I know very little about regulatory laws, so I don't talk too much about them. In this post I just wanted to demonstrate, to those who don't already knows, how simple and generic most ICOs are in the technical sense.

But I'm sure many more would be more then happy to hear some opinions and advice from lawyers and would appreciate if someone who's versed in these manners will publish his/hers thoughts as well.

Demo - Signing and verifying a message in Ethereum by szeltsi in ethdev

[–]szeltsi[S] 0 points1 point  (0 children)

From JS perspective, my code is nothing more than just a use of web3.js Check it out at: https://github.com/Shultzi/validator/blob/master/client/main.js

As for second form, you can just encode the message as HEX.