Signature not matching the sig obtained from MyEtherWallet

I am serializing the unsigned txn in C, then I found Keccak-256 hash and I signed it with the privatekey. However, the resulting signature is not the same as in MyEtherWallet for the same values(sender,to, value..) void main() { uint8_t digest[32]; uint8_t sig[64], sig2[64], priv[32], *pby, unsigned_txn[200]={0}; const ecdsa_curve *curve = &secp256k1; uint8_t txLen_,txLen, nonce_,…

Stratum protocol – problem with implementation in python

For a couple of days I’m trying to write simple script in python to communicate with stratum pool server. I’m using simplified code of NightMiner (https://github.com/ricmoo/nightminer/) and some testnet I’ve foud ( stratum+tcp://pool.bitcoincloud.net:4008), but I can’t get the proper result. Maybe someone more experienced could help me. Below I show each step of my script…

Signature not matching the sig obtained from MyEtherWallet

I am serializing the unsigned txn in C, then I found Keccak-256 hash and I signed it with the privatekey. However, the resulting signature is not the same as in MyEtherWallet for the same values(sender,to, value..) void main() { uint8_t digest[32]; uint8_t sig[64], sig2[64], priv[32], *pby, unsigned_txn[200]={0}; const ecdsa_curve *curve = &secp256k1; uint8_t txLen_,txLen, nonce_,…

Signature not matching the sig obtained from MyEtherWallet

I am serializing the unsigned txn in C, then I found Keccak-256 hash and I signed it with the privatekey. However, the resulting signature is not the same as in MyEtherWallet for the same values(sender,to, value..) void main() { uint8_t digest[32]; uint8_t sig[64], sig2[64], priv[32], *pby, unsigned_txn[200]={0}; const ecdsa_curve *curve = &secp256k1; uint8_t txLen_,txLen, nonce_,…

How does function getPastEvents works? It’s too quick

I’m trying to understand how .getPastEvents function works. When given block range to search is {fromBlock:0, toBlock: ‘latest’} it finds my events almost instantaneously. Shouldn’t filtering all 7M blocks (using Ropsten testnet) take more than a second? Code snippet if it’s of any use. myContract.getPastEvents(“EventName”, {fromBlock:0, toBlock: ‘latest’}).then( function(event) { event.forEach(element => { //doing some…

Simple, default, “hello world” smart contract for an auction? (winner wins, all the rest gets refunded)

I recently read an article: https://medium.com/@jimmysong/the-truth-about-smart-contracts-ae825271811f Because of a lot of centralized marketing from Ethereum, there’s a mistaken belief that Smart Contracts only exist in Ethereum. This is not true. Bitcoin has had, from the very beginning in 2009, a pretty extensive smart contract language called Script. If Bitcoin has smart contracts, I would like…