#ipfs

/

      • anshukla has quit
      • Tv`
        hrrmmmph i really want to randomize my hash but i don't have a convenient place to store the seed in
      • notduncansmith joined the channel
      • whyrusleeping
        put it in the cloud yo
      • Tv`
        ahh cdb knows its own size, so i'm just slapping it at the end ;)
      • whyrusleeping
        i mean, that works too
      • but the cloud is a close second best
      • Tv`
        have i already drawn your attention to the asterisk on https://bazil.org/ ?
      • whyrusleeping
        there are no asterisks on that page
      • >.>
      • Tv`
        control-F *
      • whyrusleeping
        ah, lol. i installed that on someones computer once
      • Tv`
      • andyg1974 has quit
      • managed to sneak in some inspiration from fractal tree indexing ;)
      • j-pb joined the channel
      • Daboloskov joined the channel
      • Daboloskov has quit
      • notduncansmith joined the channel
      • j-pb_ joined the channel
      • j-pb has quit
      • notduncansmith joined the channel
      • whyrusleeping
        Tv`: i like :)
      • Tv`
        it's been a long time since i've used a non-HMAC non-AEAD seeded has
      • h(seed || key) or h(key || seed) or what was the next formula
      • whyrusleeping
        what is is, fnv?
      • emery has quit
      • Tv`
        i mean, was there some stupidity in sharing the same h(seed || ...) with all hashes
      • was h(key || seed) somehow more resistant
      • ipfsbot
        [13go-ipfs] 15dylanPowers opened pull request #1176: use => Use (06master...06asset-readme-fix) 02http://git.io/vJsie
      • notduncansmith joined the channel
      • notduncansmith has quit
      • whyrusleeping
        ugh
      • the code in net is making assumptions about things
      • compleatang joined the channel
      • emery joined the channel
      • j-pb_ has quit
      • notduncansmith joined the channel
      • zootella has quit
      • notduncansmith joined the channel
      • notduncansmith has quit
      • notduncansmith joined the channel
      • Daboloskov joined the channel
      • Daboloskov has quit
      • notduncansmith joined the channel
      • Tv`
      • jbenet especially, feedback is welcome
      • notduncansmith joined the channel
      • notduncansmith has quit
      • EricJ2190 has quit
      • emery has quit
      • notduncansmith joined the channel
      • Daboloskov joined the channel
      • Daboloskov has quit
      • notduncansmith joined the channel
      • whyrusleeping
        Tv`: ping
      • are sockets buffered?
      • or better question, how are sockets buffered?
      • Tv`
        whyrusleeping: uhh two answers
      • yes and no
      • whyrusleeping
        i can have my write call return before the data is received on the other side
      • Tv`
        nothing in front of the syscall unless you put a bufio there
      • tcp has send queue and receive queue
      • but you don't want to do syscall per byte, etc
      • whyrusleeping
        okay
      • how best should i simulate that mechanism in go?
      • Tv`
        and yes if write(2) waited for the remote userspace to do read(2) you'd suffer horrible latencies all the time
      • whyrusleeping
        yeah
      • right now i'm mocking out the tcp connection with an io.Pipe
      • but that doesnt work because programs expect the write calls to finish before receiving
      • our secio handshake does a write, then a read, on both sides.
      • which means that it hangs writing on the pipe
      • because both sides are writing at the same time
      • notduncansmith joined the channel
      • krl
        whenever i want to post something online i use gateway.ipfs.io
      • notduncansmith has quit
      • that way, even if the link is broken, people will know if they found the right file
      • anshukla joined the channel
      • whyrusleeping
        krl: :)
      • Tv`
        whyrusleeping: yes many programs assume there is a buffer
      • krl
        or, if the hash is broken, that someone actually bothered to attack it
      • Tv`
        whyrusleeping: for funsies, a bunch of them break if the buffer is suddenly smaller ;)
      • whyrusleeping
        haha, i was just thinking that our crypto stuff might break if keys were too large
      • and filled up the write buffer in the initial swap
      • krl
      • Tv`
        whyrusleeping: the right fix is to separate inbound & outbound processing
      • whyrusleeping
        hrm....
      • Tv`: this is what i have right now: https://gist.github.com/whyrusleeping/811593acb...
      • Tv`
        whyrusleeping: btw net.Pipe is pretty much what you're constructing there
      • whyrusleeping
        >.>
      • whyrusleeping didnt know net.Pipe was a thing
      • Tv`
        still synchronous, which isn't enough for everything
      • but really, A and B both doing write+read is a broken protocol
      • whyrusleeping
        yeap, was just about to ask if you think that our protocol is broken
      • Tv`
        rejoice this coming forth of the truth, even if it doth hurt
      • imagine me the OS giving you a TCP window size 1
      • you're relaying on good weather for correctness
      • "correctness"
      • every protocol should survive OneByteReader
      • whyrusleeping
        that package is beautiful
      • oh my god, where has this been all my life?
      • notduncansmith joined the channel
      • anshukla has quit
      • okket
        evil intentions are not needed, a misconfigured MTU on the other side is enough...
      • whyrusleeping
        yeah
      • okket: btw, thanks for posting that last panic report
      • it wasnt any different than any of the others i had, but the fact that it happened to you made me look deeped at the trace
      • okket
        :)
      • whyrusleeping
        also, question about the context switch graph
      • it shows high context switching for about a days time, and then really low
      • okket
        only the last 24h are relevant in the graphs
      • whyrusleeping
        ah, okay
      • it wasnt running the entire week?
      • gatesvp joined the channel
      • okket
        no only the "ramps" in the graohs is the ipfs daemon, the others are "zpool scrub", compiling sessions... i put the week graph in because it shows the ramp very prominently
      • whyrusleeping
        gotcha
      • notduncansmith joined the channel
      • okket
        my first observations are still valid, this "ramp" does not correlate to any other graph i can gather from my system with munin
      • whyrusleeping
        yeah, its quite concerning...
      • okket
        it does hurt performance as much as i thought. my initial motivation was very high latency in my system, but that was not due to the high context switches but packet loss between the server and me. even with 30k ctx / s the server runs smoothly. but stilli its rather unnecessary consumption of system resources...
      • whyrusleeping
        entirely agreed
      • i really want ipfs to be able to run on super low performance machines
      • and i assume tiny machines will have problems with 30k context switches per second
      • okket
        and anything that runs on battery... ;)
      • gatesvp
        @whyrusleeping: I have the same "cloud" sticker on my laptop as well, right beside my IPFS one :)
      • sorry I've been AFK for a few days, finally back on the code for some time this evening :)
      • notduncansmith joined the channel
      • anshukla joined the channel
      • sharky has quit
      • whyrusleeping
        gatesvp: i think i got this sticker because you posted it :)
      • sharky joined the channel
      • Daboloskov joined the channel
      • Daboloskov has quit
      • notduncansmith joined the channel
      • notduncansmith has quit
      • gatesvp
        @whyrusleeping: quick question, when I see a `log` statement in the code, where is that going? for example: log.Infof("adding file: %s", file.FileName())
      • it's not in `events.log` is there a separate file?
      • whyrusleeping
        gatesvp: those go to stderr
      • if the logger is set to their level
      • the logger defaults to error
      • and the logger will show all log messages greater than or equal to the log level
      • you can set the log level two ways, either via the env var IPFS_LOGGING
      • or you can use the ipfs log command
      • i.e. 'ipfs log level all info'
      • gatesvp
        right, this rings a bell, I need to remember the `out to stderr` command in windows :)
      • ahh... the logs all go through the daemon.. OK
      • now this all makes sense