[ot][spam][crazy] uploading stuff to blockchains
i'm poking at arweave a little https://github.com/xloem/gitlakepy has an arweave backend that provides for free uploads but it has bugs. i'm trying to work on those bugs now! i'm holdin' the intention! note: the free backend goes through a single remote server without reason to trust this server nor the connection with it.
i've successfully shelled into the server i'm trying to upload from. note: the data i'm uploading is low value and large.
an idea rises in me, of instead uploading data with higher value. i'm guessing that since i am a lone nerd, my high value data is too low value for it to be forthright to claim that it has high value, although it certainly does for me. so, low value data to start with. just guesses. i would indeed rather upload data i value more. kind of a neurotic approach to the task.
i'm guessing that arweave is very good at handling people uploading terabytes of data. i could be wrong about this.
another idea is uploading this mailing list history! sounds a little helpful. the gitlake backend breaks it all into 100k blocks to keep it free, so it wouldn't be navigable without a frontend to stitch it together.
i often get distracted by upgrading out of date packages, when i log into a server. i've opened two panes on this one, so i can do that while also doing other things.
here's my mount output right now. i think it might indicate i need to mount something, but i might need to look at it again to be sure: /dev/sdc1 on /media/extra.sdd1 type ext4 (rw,relatime) /dev/sde2 on /boot type ext4 (rw,relatime) /dev/sde1 on /boot/efi type vfat(rw,relatime,...) /dev/sdf2 on /media/extradisk type ext4 (rw,relatime) looking on the mount folders will help me tell.
i made it to the folder! this really helps me feel confident around being in the task. i have many tmux panes still open. some of them may contain ongoing work. i'll scrub through them briefly.
no. no processes are running, nor are any panes in that folder, although i did discover other ongoing tasks, briefly. i'll restart some uploading processes. i don't recall what errors happen, but i do recall it takes a bit for them to happen. i think one of the errors might be upload processes just hanging, doing something.
it hangs for a bit on start doing `git cat-file` then it moves on to checking the status of things that are partly uploaded, I believe. it would be helpful to send the git-annex debug output somewhere different from the user output.
it was successful to use --debug and pipe stderr to a file. this is good news for me. it will help things i've been doing.
reviewing the log file, it turns out i've made other logs. but likely not with the stream separation. the logs could help me find the errors, although it would help if i remembered making them.
right now it's trying to resume upload of a file chunk that is 34359738368 bytes large (32 MiB). i've identified i have information in me around tuning this upload. i'm uncertain whether or not I have applied the information yet, or what it is. it relates to chunk and subchunk sizes. information: these files are chunked into 32MiB parts. this greatly slows the upload by making metadata files very very large. i have written code that provides for uploading parts that are arbitrarily sized, by subchunking them. this code is being used already in the 32MiB uploads. no, that's not accurate. that's about something different. well, it was helpful to think about a bit. the resuming is going slowly
the 32MiB is to ease uploading to other, non-arweave systems. it may be unneccessary, and it may be slowing the uploads. i'm not sure.
the log has timestamps that may be helpful in identifying what is making it so slow. but is suspect it is slow because it is checking for the presence of many chunks. rising the chunk size could speed that. 1645 ET the things it is checking for are named like BLAKE2B256-s34359738368-S67108864-C206 and i can visually see that it is pausing within the region where it would check the network for presence, so that is likely what is slow. the names indicate that the remote is configured for a very small chunksize. this is the most helpful area to increase the speed, as this does relate to the metadata size too. the name says the chunks are 67108864 bytes large, probably 64MiB .
it's finished finding what's already uploaded, and is uploading more chunks. i'm guessing the filesize is not 32MiB, but rather 32GiB. this was probably an error on my part. i'm a little confused since the state of things changed. actually i'm very confused, which i am used to. i'm not sure whether it's good to let it continue with 32MiB chunks. i think it would make sense to check the chunksize. ideally, it would make sense to modify the arweave backend to inform the user of the chunksize, to prevent repeating the check over and over again.
in order to check the chunksize, i opened a worktree for the git-annex branch. git-annex keeps its metadata in a dedicated branch, a security/integrity problem i have run into. anyway, this branch is too big to check out at a reasonable speed. i haven't actually finished a checkout. a lighter-weight way to check the contents of the branch would be to use git commands, maybe something like git ls-tree or git cat-file .
i actually just finished a checkout of this branch. maybe i had too much i/o going on last time. i was assuming something was wrong because the branch was in an inconsistent state. i don't know why, for sure.
nooooope it didn't actually check out on to git commands while that git process tries to remember arithmetic in the face of too many chunks to comprehend
i used git ls-tree and git cat-file to find the remote config in git-annex/remote.log: 36be9e2b-b67c-42e0-a390-fdd1c296f287 bundler=https://node2.bundlr.network chunk=64MiB combine-to-bytes=25600000 encryption=none externaltype=arkb-subprocess name=arkb-bn2-100k subchunk-bytes=100000 type=external it would make sense to remove chunk=64MiB . git-annex responds to this by making a separate file for every part. suddenly, i'm not actually sure that changing that will help. since it uses the same hash, it shouldn't have to store any further metadata on it.
anyway, i guess i'll do more processes with the split logging, and see if i can find a problem. looking at speed and reliability problems sounds helpful.
what i usually do is upload many jobs at once, so that data travels during the downtime. but when i let it run for a while doing that, i come back and it's stalled. i'm thinking those older logs i have. they probably show that stalling.
i'm a little confused around the logs. the parallel jobs i started have resumed, which is gratifying. a quick solution could be to just terminate the process every 24 hours and restart it. that would handle stalling, in a crude way. implementing that does not mean my work on the system is done or anything.
i have nascent scripts on this machine for automating things. i'm not using them. they are still configured to upload to w3 instead of arweave. i would like to upload to both, at some point. (or any two permanent services).
the uploader script uses `git annex sync --content` . i'm not sure if that will still return a true exit status. but i suppose it's ok since it takes so long to finish, and i'd be terminating it every 24 hours anyway.
the script looks designed to detect and report failures. i think a second interim script would make sense here.
the script looks designed to detect and report failures. i think a second interim script would make sense here.
a funny thing here is i installed codex for neovim on this box, but haven't used it it guesses what i'm going to type relatively well
to not cause errors for myself later, it would help if this script detected termination and didn't leave something ongoing in the background i think that's done with signal handlers
from http://redsymbol.net/articles/bash-exit-traps/ #!/bin/bash function finish { # Your cleanup code here } trap finish EXIT
i've started the script, in a further cludgy way i'm curious what the present issues with uploading to web3.storage are
so, i remembered what the problem with chunking is. for each chunk, it stores a uri containing the txid to recover the chunk. that turns into a _lot_ of uris, which seriuosly bloats the git-annex branch and slows everything. my intuition was that it was doing that too much to sustain. i needed to turn off the chunking. so, that seems important. the gitlakepy backend does subchunking that doesn't need local storage to index, and can be verified in depth with an fsck on the remote.
there may also be a bug around downloading of things, which could be important if they are not being uploaded properly. so: - turn off chunking entirely, as found from the remote.log line - look to see if there is a downloading issue - pending afterward: review uploading of large chunks to see if they are resumable. there may also be an inefficiency around the system used to do the upload, it's cache may not be designed for many many files. unsure.
i think remote settings are changed with `git annex enableremote`, and i think i can check this
`man git-annex-enableremote`: This command can also be used to modify the configuration of an existing special remote, by specifying new values for parameters that are usually set when using initremote. (However, some settings such as the as the encryption scheme cannot be changed once a special remote has been created.)
the chunk parameter has been set to the empty string and i am restarting the processes uploading low value data
the log indicates it is attempting to perform uploads, and it is also iterating through 64MiB chunks that have already been uploaded. guess i'd better see whether it is uploading in chunks or not.
the transfer command is successfully sending an entire file. i'm worried about resuming, as the files are quite large, and i don't recall implementing resuming.
the system has become temporarily nonresponsive during path completion. i was investigating what a process was doing, and tried to tab-complete a temporary file it has open
$ ls -l /tmp/tmp-2235610-2EC50TaXr1J ls: cannot access '/tmp/tmp-2235610-2EC50TaXr1J': No such file or directory $ ls -l /proc/2235610/fd total 0 lr-x------ 1 user user 64 May 6 17:31 0 -> 'pipe:[8747951]' l-wx------ 1 user user 64 May 6 17:31 1 -> 'pipe:[8755804]' lr-x------ 1 user user 64 May 6 17:31 10 -> 'pipe:[8767636]' l-wx------ 1 user user 64 May 6 17:31 11 -> 'pipe:[8767636]' lrwx------ 1 user user 64 May 6 17:31 12 -> 'anon_inode:[eventfd]' lrwx------ 1 user user 64 May 6 17:31 13 -> 'anon_inode:[eventpoll]' lr-x------ 1 user user 64 May 6 17:31 14 -> 'pipe:[8759559]' l-wx------ 1 user user 64 May 6 17:31 15 -> 'pipe:[8759559]' lrwx------ 1 user user 64 May 6 17:31 16 -> 'anon_inode:[eventfd]' lr-x------ 1 user user 64 May 6 17:31 17 -> /dev/null lrwx------ 1 user user 64 May 6 17:31 18 -> /tmp/tmp-2235610-2EC50TaXr1Ja
this kind of stuff can really confuse me. the file doesn't exist but is open. that can happen on linux.
it's getting ECONNABORTED sending a POST request with body possibly taken from such a tmp file
strangely, in the log, many lines are labeled based on the subprocess id that generates them, which you'd think would be usable to uninterleave them, but many of the debug lines are split across many lines, which is strange since their content is relayed based on a line-based protocol where a newline terminates the data it looks intentional though as the extra lines have timestamps
ok i think it's that the debug info is output twice, one in one log format, then one in another, so grep works for filtering
the error output is confusing and too verbose i haven't finished parsing it but it looks like it gives sufficient information to exactly reproduce the post request using curl, for debugging or reporting to a sysadmin if the tmpfile it's reading from has been destroyed, i'd have to access it based on the open process's handle or something
Error: timeout of 100000ms exceeded path: '/tmp/tmp-2235880-dEjFtzdxCedl', requestBodyLength: 101212, code: 'ECONNABORTED', _header: 'POST /tx HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'Content-Type: application/octet-stream\r\n' + 'User-Agent: axios/0.21.4\r\n' + 'Host: node2.bundlr.network\r\n' + 'Connection: close\r\n' + 'Transfer-Encoding: chunked\r\n' + '\r\n', I'm guessing that the request is timing out and being aborted by local code. not certain. it shouldn't take 100s to upload 100KB . but it can happen for systems carrying heavy loads with load management bugs.
i'm confused by my network lag. i guess i'll plan to shell in from a parallel terminal session
the host is behaving like the error it reported. my attempt to connect to it is now hanging. i thought i had paused the upload process, so there shouldn't have been new developments, but i could be mistaken. often when my systems do this it is due to thrashing: too much memory allocation
the local terminal is now being nonresponsive. pressing keys to terminate the connecting ssh process seems to do nothing.
participants (2)
-
punk
-
Undiscussed Horrific Abuse, One Victim of Many