[spam][crazy][wrong][ot] ramblings

Karl gmkarl at gmail.com
Wed Nov 24 14:44:59 PST 2021


whooo!

it's 16:15 on 2021-11-24 and i know that well because i just typed a
spamlogtiny where i found the broadcast rpc call for
libretchingandvomiting and ... then my xorg began misbehaving such
that only the menu bar would respond to keyboard and mouse input, no
matter what window was focused, and then i wrote a script to dump the
memory of my chrome processes, and the visible email content didn't
seem to be in the memory i dumped, and then my system ran out of
space, and my body froze up and started spasming ...

basically when my computer gets a corruption i start thinking aliens
are hacking my brain and everything goes wrong.

but then i rebooted the system!  the email was apparently lost, _but_
i have part of a script started for dumping process ram, so that's
progress for future situations.

in my imaginary world where i can do free makery stuff, i use a field
probe to read the ram directly from its refresh emissions using an
sdr.  but we are not in this imaginary world so i use /proc/[pid]/mem
and /proc/[pid]/maps .  it would be good to set the kernel settings
that let me use /dev/mem, be super helpful.

anyway !  libtotallygrossdestroyedwaste is still seeming fun to
pursue.  there's also a thing in an hour i'd kinda like to try going
to.

my new scared habits know to hit 'save draft' over and over and over
again to make life make more sense.  it's 16:55 and i'm hitting 'save
draft'.

16:57 i hit 'save draft' again.  and here i go again.

i like hitting it.

in electrumx, transaction_broadcast() expects a hexadecimal string
passed, and it's called in response to
'blockchain.transaction.broadcast'  yay!  it's 16:58 and i'm hitting
'save draft'.

it's 17:00 and ................ the rpc call source reads like it
would return the transaction hash after broadcast.  i'm hitting save
draft!  it's 1701 !

1703.  omigod i wrote a broadcast wrapper!  it's a 1-line function and
it's so hard.

i know it won't work yet (because my error density is so high) but here it is:
    async def broadcast(self, txbytes) -> str:
        return await self.request(str,
'blockchain.transaction.broadcast', txbytes.hex())

woohoo !  saving draft.  and code.

ok ummmm i'll use the op_return code to test it.  i'll use my mobile
phone to send money to a private address.  the hardest part will be
making the private key because th eop return code uses a local node.
maybe i'll just focus on that.

it's 1718.  hitting 'save draft'.  what a nice, friendly button.

now it's 1719.

anyway i've made a possible opreturn output, pending bugs.  the
biggest concern around craftin ga transaction is estimating a fee.
maybe i'll make a quick fee estimation wrapper.  1719.  i better wrap
other useful things too like getting utxos.  and that will mean
identifying an address by its 'hashx', an electrum-specific thing.

1726 how to get a hashx is at
https://github.com/spesmilo/electrum/blob/8d7370d897314d8542906aecc6a45cc949651f77/electrum/bitcoin.py#L475-L477

def address_to_scripthash(addr: str) -> str:
    script = address_to_script(addr)
    return script_to_scripthash(script)

or in electrumx in coin.py class Coin
    def address_to_hashX(cls, address):
        '''Return a hashX given a coin address.'''
        return cls.hashX_from_script(cls.pay_to_address_script(address))

1728

1732.  i guess i'll be going to my event to stay more stable.  maybe
switchin' gears.


More information about the cypherpunks mailing list