PLONKathon notes

The MacOS Commands that Aayush Ran

brew update && brew install pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc
pyenv install -v 3.9.1
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
git clone git@github.com:0xPARC/plonkathon.git
cd plonkathon
poetry --version or ~/.local/bin/poetry --version

  • Poetry (version 1.3.2)

poetry install
poetry run python test.py

  • You should see this error:
    ​​​​Extracted G1 side, X^1 point: ​​​​... ​​​​Traceback (most recent call last): ​​​​ File "/Users/aayushgupta/Documents/projects/plonkathon/test.py", line 264, in <module> ​​​​ setup_test() ​​​​ File "/Users/aayushgupta/Documents/projects/plonkathon/test.py", line 23, in setup_test ​​​​ assert commitment == G1Point( ​​​​AssertionError

Brian's MacOS Installation Notes

  • installing poetry didn't work with system python3 (MacOS), so i needed to first get pyenv (relevant Github issue explaining this )
  • followed instructions here to install pyenv with brew: https://github.com/pyenv/pyenv
    • brew update && brew install pyenv
    • echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
    • echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
    • echo 'eval "$(pyenv init -)"' >> ~/.zshrc
    • source ~/.zshrc
  • then used pyenv to install and set global the latest version of python3. checked that pyenv's python3 was the default with which python3 and python3 --version
    • pyenv install -v 3.9.1
  • then followed the instructions here to install poetry: https://python-poetry.org/docs/
    • curl -sSL https://install.python-poetry.org | python3 -
  • poetry is accessible from ~/.local/bin, so I had to add ~/.local/bin to $PATH (add a line to zshrc)
    • echo 'export PATH="~/.local/bin:$PATH"' >> ~/.zshrc
      • this didn't work for me, so I just use ~/.local/bin/poetry to call poetry instead
  • repo setup
    • git clone git@github.com:0xPARC/plonkathon.git
    • cd plonkathon
    • poetry --version or ~/.local/bin/poetry --version
      • Poetry (version 1.3.2)
    • poetry install
    • poetry run python test.py
      • You should see this error:
        ​​​​​​​​​​​​Extracted G1 side, X^1 point: ​​​​​​​​​​​​... ​​​​​​​​​​​​Traceback (most recent call last): ​​​​​​​​​​​​ File "/Users/aayushgupta/Documents/projects/plonkathon/test.py", line 264, in <module> ​​​​​​​​​​​​ setup_test() ​​​​​​​​​​​​ File "/Users/aayushgupta/Documents/projects/plonkathon/test.py", line 23, in setup_test ​​​​​​​​​​​​ assert commitment == G1Point( ​​​​​​​​​​​​AssertionError

Indexing into evaluation form

The paper 1-indexes in Lagrange form. We advise you to 0-index instead for sanity (so basically subtract 1 from the relevant indices from specs in the paper).

Miscellaneous notes

  • In Round 2, you can safely use
    k1=2
    and
    k2=3
    ; then
    H
    ,
    k1βˆ—H
    ,
    k2βˆ—H
    will indeed be cosets.
  • The field order
    p
    is such that
    pβˆ’1
    has high 2-adicity, so FFTs up to large powers of 2 will work as expected.

Transcript

https://github.com/therealyingtong/plonkathon/blob/main/transcript.py