asciilifeform: this whole thing would probably fit in ~1,000 lines of c.
asciilifeform: however it does have the advantage of not using 10,000,001 lines of ext4 open sores crapolade for anything.
asciilifeform: but, thing is, it won't work any better on mechanical disk than the old bdb. and imho it is quite impossible to make variable-length tx bitcoin work well on mechanical disk, with modern spamola level.
asciilifeform: anyway this is the simplest physically-possible scheme.
asciilifeform: how to ~write~ to this data structure is, i think, obvious to the reader, i do not need to describe.
asciilifeform: and there we find ~lists of block indices~, so the machine might have to try 2 or 3 blocks before it finds tx.
asciilifeform: BUT if there are collisions, the upper bit of the 32bit entry, is set. and then we know that the lower 31, are an index into another contiguous array
asciilifeform: after which finding the actual tx is an O(N) operation in the block, with small N (the tx in the block)
asciilifeform: if there are no collisions (i.e. there is no other tx on the disk whose id begins with 3ec455a2) then that entry in the array IS the block index where the tx lives.
asciilifeform: now you store the table as follows: the top 32 bits (e.g., 3ec455a2 from above) are an array index into this table☟︎
asciilifeform: picture a 16GB contiguous block of ssd. you cut it up so that it corresponds to 2^32 x 32bits.
asciilifeform: btw i will also put down in the log, one very simple possible algorithm for a 'txidx-fs' :☟︎☟︎☟︎
asciilifeform: and likewise when a new block comes, all of the tx in it, get indexed this way.
asciilifeform: ... so that a 256-bit turd, e.g., 3ec455a2a84e978687a3990cec73f36b324fbd28e03603c6d9fc52018b001558, can be taken and matched to a block # where said tx lives.☟︎
asciilifeform: it exists (wallet idiocy aside) in trb for 1 purpose and 1 purpose only
asciilifeform: let's put down in the log, what exactly ye olde bdb does, that eats 99+% of trb's wall clock:
asciilifeform: to rephrase, this would tell something useful if we had with what to directly compare it with -- what operation in ye olde bdb would this measure correspond to ?☟︎☟︎
asciilifeform: somehow, long ago internalized mircea_popescu's above point re the model airplanes.
asciilifeform: http://btcbase.org/log/2017-03-10#1624188 << i built myself a 'games box' , not long ago, 'to unwind', but turned out that the part of my head that was able to enjoy this, had atrophied, found myself constantly 'if i'm this awake, oughta be running $experiment, finishing up $unfinisheds', etc. ended up giving the (princely) fuckofftron to brother to play with.☝︎
asciilifeform: ( the sane folx, who had alphas with tru64, openvms, etc, went 'wtf why would i even think of winblowz' -- which wouldn't do. whole edifice 'musted die' )
asciilifeform: one perverse fact, is that microshit had a winblowz ecosystem for it, ready to go, it could have been he 'designated winner' in intel's place. except -- no, because gotta target the konsoomer chump junk ...
asciilifeform: not quite 'fits in head' machine, but 'fits in book'
asciilifeform: re alphas, i am rather fond of the alpha, i have several here, possibly mentioned before
asciilifeform had a prof in uni who taught systems architecture (cpu design) with itanic as 'what not to do'
asciilifeform: afaik only known working examples are in usg heathen pits
asciilifeform: mircea_popescu: 'itanium', vliw monster for which nobody was ever able to make a useful compiler
asciilifeform: and turned from a sort of 'cyrix' , piss clones maker, into actual cpu house
asciilifeform: http://btcbase.org/log/2017-03-10#1624146 << alpha was already half-dead when hp swallowed compaq, in '02. iirc compaq shitburied it in '01 and sold all rights to intel, who proclaimed the arch now known as 'itanic' as its replacement.☝︎☟︎
asciilifeform: http://btcbase.org/log/2017-03-10#1624127 << the classic alpha ver you described was in one of the subdirs, aha. and a recent g5 one (that dks mentioned to me in 2010 when he delivered the long-awaited genera alpha to my rupturefarm)☝︎
asciilifeform: 'For a long while I was doing research in software productivity. We began asking, ‘What is wrong? And why is it so difficult? Why is it so costly? What is complexity?’ It led me to interesting research, but nothing happened. We did not discover how to formulate or mathematically express the idea of program complexity. Not program complexity in the sense of algorithmic complexity—NP-complete problems and all that jazz—but the
asciilifeform: apparently was a consortium of mainframe makers, serious r&d corps, etc., worked on cad. utterly thermonuked by lisp winter and the microshitization of computing.
asciilifeform: 'MCC was part of the Artificial Intelligence boom of the 1980s, reportedly the single largest customer of both Symbolics and Lisp Machines, Inc. (and like Symbolics, was one of the first companies to register a .com domain). ' << aaaah apparently THAT's how.
asciilifeform: not so much as a broken shard of babylonian clay pot.
asciilifeform: holy fuck how can something the size of mcc vanish without ANY trace