---
layout: post
title: Logs for the Monero Research Lab Meeting Held on 2018-05-28
summary: Sarang work, Surae work, and miscellaneous
tags: [community, crypto, research]
author: el00ruobuob / surae
---
# Logs
**\** sure~
**\** Greetings everyone
**\** welcome to the MRL Research meeting for the week
**\** Hi. Lurking for one here :)
**\** yo
**\** mostly an informal discussion of what we've all been getting up to for the past week
**\** hi
**\** o/
**\** Happy Memorial Day to those who celebrate it today!
**\** i know sarang has been discussing fees with myself and ArticMine, and we both have been talking about multisig with each other... does anyone want to put an item on the agenda?
**\** otherwise, sarang and I can just describe what we've done this past week and get on to it, but i know some folks have been working on a lot of stuff
**\** oh, man i forgot to ping UkoeHB
**\** ya if i may, you should ping ppl at the start of the mtg
**\** Yes there is plenty to discuss for BPs, fees, and optimizations
**\** endogenic: I pinged people about 20 minutes ago
**\** but point taken
**\** Sarang, how about you go first
**\** I worked with moneromooo to speed up BPs
**\** we can let people jump in with questions
**\** Here is timing data for the expensive multiexp operations they use, to illustrate: https://imgur.com/a/rZB0vin
**\** The green bar, Pippenger, is the new one
**\** BPs start at 256 points, on the x-axis
**\** cool!
**\** suraeNoether: think both can be helpful
**\** Once we finish up some testing, BPs will use a combination of algorithms. The speedup on the operations has been clocked at 40% of the original
**\** The audits continue
**\** What really remains is determining fees, as was discussed last week
**\** fluffypony knaccc luigi1111 anonimal andytoshi ArticMine binaryFate chachasmooth dEBRUYNE endogenic gingeropolous hyc iDunk IsthmusCrypto john\_alan JollyMort[m] jwinterm kenshi84 medusa\_ moneromooo MoroccanMalinois needmoney90 nioc nioc\_ othe philkode rehrar rrol[m] sgp\_[m] smooth sneurlax[m]1 stoffu TheCharlatan unknownids vtnerd waxwing
**\** okay, so let's talk about fees really quick
**\** yes
**\** since verification times are roughly constant across powers of 2 (in terms of number of outputs) and the space is proportional to the number of outputs, we can get a good simple fee model going
**\** This chart shows timings \_before\_ the new Pippenger optimizations: https://docs.google.com/spreadsheets/d/1HPk2a0atBqLqUlxQqBLiQXEJi-e1egIMYu3tS1NGHUo/edit#gid=0
**\** It's the same chart as I presented last week, but gives an idea of timings
**\** say N = # outputs, and 2^(m-1) < N <= 2^m. then space is approximately N and verification time is approximately m = round(lg2(N)).
**\** The timings also do \_not\_ account for batch verification, since that depends on what size proofs a client has
**\** suraeNoether: space does not scale linearly with the # of outputs
**\** It essentially forces verification time as the major pricing element when comparing a 2 output proof with 2^N output proof
**\** Yes. Compared to Borromean, space is basically constant
**\** at least across the ranges we deal with
**\** 64 bytes for each additional factor of 2
**\** From the table
**\** yes, it's a very small increase
**\** but among all costs to consider, it's the smallest
**\** wait, sarang, verificaiton time is O(N) and space is lg(N), right? according to that table we glanced at earlier
**\** For single verification, yes, but it scales with the next power of 2 from N
**\** right
**\** We don't have the more general BPs that can handle any number of outputs cleanly
**\** (and we'd never get that change audited since it's tricky and not published)
**\** so, my point is: if we consider space to be wasted download time, then everything is about time, not space-and-time
**\** and so for fees
**\** more or less
**\** we can either do space+time, and pick some constants a, b and charge fees a\*lg(N) + b\*N
**\** or we can do space\*time and pick some constant a and charge fees a\*N\*lg(N)
**\** Yes we can convert between space and time. The question becomes the conversion factor
**\** so, for a 2-in-2-out transaction
**\** lg(N) = 1, N=2, so we charge a base fee of 2\*a
**\** whatever we think is fair for that, say a = 1 piconero
**\** We have to modify the penalty formula this is critical
**\** To reflect the time component
**\** So converting time back to space is the simplest way
**\** ok here
**\** ArticMine: the time component is linear in number of outputs, and I think the penalty formula is already linear in the number of outputs?
**\** We can use the 2 output proof ans the starting point. Then add a space weight linear to the number of outputs to account for the time
**\** wait, i'm getting myself confused here
**\** Are we accounting for the fact that a 9-proof and a 15-proof take the same verification time, roughly?
**\** that's a hugely important observation
**\** The penalty formula is size based and includes all the transaction inputs
**\** ArticMine: okay, so check this out
**\** We have to price 9 and 16 the same
**\** ArticMine: the time to verify is approximately linear in size
**\** ArticMine: in number of outputs i mean
**\** Time to verify is linear in outputs for each 2^N
**\** so 9 and 16 is the same
**\** It's linear in the number of outputs used, but we pad to ensure there are always 2^m
**\** We'd need the unpublished BP modifications to get rid of that requirement
**\** because of padding
**\** assuming everything is being rounded up to the nearest power of 2, time = O(N outs). space = O(log(N outs)), essentially. so fees can be a\*N + b\*log(N). agreed or disagreed? if measured in atomic units of monero, we can write this as N + c\*log(N) if we like and if we want to pick c carefully.
**\** We do get much smoother time changes if we use separate proofs
**\** but at the cost of greater size
**\** This discussion is all assuming we require a single proof
**\** i am not assuming that at all
**\** i'm going proof-by-proof
**\** Well
**\** If we split proofs, each proof is an optimal size from a verification perspective
**\** if every proof pays fees in proportion to both space and time, then there's an economic incentive for wallet software to find the best solutions for output management
**\** If we round, some are more optimal than others
**\** if someone wants to make a sloppy BP, then \*fine\* let them pay for it by simply charging in proportion to number of outputs. is what i'm saying
**\** suraeNoether Yes size which determines penalty which in turn sets fees would follow a\*N + b\*log2(N)
**\** ok so next question: how many fees should a 2-in, 2-out transaction incur? what about a 2-in, 4-out transaction?
**\** Though given the data I suspect that a\*N will be dominant
**\** ArticMine: it will be
**\** but since most txns are 2-in, 2-out, we're really over-optimizing the crap out of this
**\** is it only the number of outputs that affects the verification time for BPs?
**\** all we need is a quick metric that asymptotically matches the cost in space and time. that's all we need. :P
**\** For 2 in 2 out there is not change from the current formula
**\** jwinterm: yes
**\** Since this will be used as the base tx size
**\** okay, so call that fee F
**\** and we set F = a\*2 + b\*1
**\** ArticMine: but I assume the prefactor will be smaller than currently
**\** Since we're dropping both verification time and space from the current txns
**\** now for a 2-in 4-out transaction
**\** oh, we don't want to do that one
**\** we need linearly independent choices
**\** so what about a 1-in, 2-out transaction?
**\** ah, the fees will be the same
**\** heh
**\** okay, so what about a 3-output transaction?
**\** for a 4-output transaction, they'll pay double, so we may as well make a 3-output transaction 50% more
**\** 3 out same as 4 out
**\** oh ok
**\** that works too
**\** The will pay double on the proof
**\** very likely but not on the rest of the tx
**\ \<@suraeNoether>** but since most txns are 2-in, 2-out, we're really over-optimizing the crap out of this
**\** No, because this is a defense against attacks.
**\** So you have to consider the worst case here.
**\** jumping in: yay new chapter
**\** https://www.pdf-archive.com/2018/05/28/zero-to-monero-first-edition-v0-17/zero-to-monero-first-edition-v0-17.pdf
**\** Which is why we have to add a space penalty term for the spoace gains in say 2 out to 4 out 8 out etc
**\** thanks UkoeHB
**\** okay, so ArticMine and sarang, let's talk about fees after the meeting
**\** Sure
**\** i don't want to waste a bunch of folks' time, but I think I have a formula
**\** sarang, my understanding is you are taking June off to teach, correct? and that during that time you'll be volunteering your time at MRL to complete, for example, the bulletproof audit
**\** Yes, I'll be teaching a crypto course for Duke
**\** w/o FFS pay
**\** I'll be volunteering time to manage the BP udit
**\** \*audit
**\** If it ends up being more time than expected, I can adjust the next FFS accordingly
**\** The first week of June is BS training, so I'll be partially available
**\** cool. UkoeHB care to share/describe your newest chapter in zero-to-monero?
**\** blockchain
**\** lol
**\** "blockchain" he said, with stars in his eyes
**\** short and sweet
**\** and two new appendices: block content, genesis block
**\** If I were a VC, that statement alone would get you funding
**\** lol
**\** sarang i should have asked: do you have anything else you want to talk about before we move on?
**\** Did a little timing on the noninteractive refund stuff, turns out they're a little faster than typical signatures
**\** finished up the tech note, hoping for internal review before we release
**\** oh yeah, i wanted to ask: think there's a way we could compute \*all\* our key image basepoints in a way that can exploit the speed-up you discovered?
**\** sarang, can you also give us a link to your dual output tech note?
**\** https://www.sharelatex.com/read/vcyxgpntfsgz
**\** I don't know a great way to do it safely with just the single pubkey value
**\** k
**\** If anything I'd rather find a way to reconstruct MLSAG to use other speedups
**\** but I've given almost zero thought to that
**\** so, in the past week I've read this paper in detail (https://scholar.google.com/scholar?cluster=15619301617669058049&hl=en&as\_sdt=0,6) and this paper in detail (https://arxiv.org/abs/1503.08768) and this paper in detail (https://scholar.google.com/scholar?hl=en&as\_sdt=0%2C6&q=okamoto+beats+schnorr&btnG=) and this paper in detail (https://eprint.iacr.org/2018/068) to get to the bottom of this multisig
**\** unforgeability proof
**\** the long story short: I believe that by adding the commit-and-reveal phase of the musig appraoch to our ring signatures will result in a provably unforgeable scheme
**\** too bad they couldn't fix it without that phase
**\** it's fine, i like that phase in general
**\** but it also improves the security assumptions
**\** commitment isnt' scary, sarang
**\** yes, it does
**\** unfortunately, we fork all over the place
**\** and depending on the constructions, things can get out of hand rather quickly
**\** on the plus side, the paper is, once again... smaller than it was. :D
**\** unfortunately i'm debugging some latex code so it's not viewable right now
**\** that has basically been my whole life this past week, although I spent some time looking into what it would take for a zk-ledger-based sidechain to work merge-mined with monero
**\** i believe a very private "banking system" with off-chain transaction processing through semi-trusted third parties could be a second layer on top of monero
**\** but that's not where my mind has really been at, which has been on multisignature unforgeability proofs
**\** sarang, I believe, will be posting his monthly report, as will I...
**\** and later today, I'm helping advise zcash foundation on how to spend a quarter million of their dollars on grants
**\** anyone have any questions?
**\** Yep, my report will go up later today, once I again remind myself how markdown works on various platforms
**\** I love how it's different EVERYWHERE
**\** oh, and we have formalized our research roadmap from our meeting last week! i can't believe I forgot to metnion that
**\** aye
**\** https://github.com/monero-project/research-lab/issues/29
**\** if anyone has questions or concerns or comments, that's a good place to throw them
**\** oh you can update z-to-m link with new draft :)
**\** yay
**\** Nice roadmap. I'll definitely want to be in the loop for item 4, the "research infrastructure" - and I'll try to contribute myself.
**\** good to hear :D
**\** allright, well, let's finish this \ and talk about fees