a w macpherson
  • ❓

Posts

How likely is an attack on Arbitrum?

Optimistic rollups are a method to off-chain computations from congested blockchains. Instead of recording transactions directly on the main chain (L1) with full replication across all nodes, state updates are processed by a separate network which reads messages from an “inbox” smart contract on L1 and publishes only a lossily compressed form (i.e. hash) of the resulting transition. Since these computations are not directly verified by L1, a mechanism is needed to ensure that transitions are correct, that is, that the rollup does not confirm invalid blocks....

April 5, 2022 · Andrew W. Macpherson

Trivial contracts in Solidity

Solidity is a high-level object-oriented programming language designed for crafting contract creation requests for the Ethereum network. Like most modern languages, it provides variables, functions, and control flow. It also has a notion of “contract” that resembles OOP objects. On the other hand, if one studies the Ethereum yellowpaper, one finds none of these concepts — Ethereum nodes recognise binary data representing strings of EVM opcodes, which is a stack-based language modelled on common CPU instruction sets....

January 10, 2022

Python packaging unpacked: Metadata

Every distribution package for Python comes bundled with certain metadata. Metadata consists of a name and version, dependency and compatibility information, and human-readable or indexable information such as keywords and “trove classifiers”. It can be read from an index like PyPI or accessed from within Python using the standard library moduleimportlib.metadata. It is sufficiently important to reiterate: these metadata are a feature of a distribution package as a whole, not any import package or script that it might contain (though in a small distribution package, there might somewhat confusingly be one of each of these, all sharing the same name)....

September 26, 2021 · Andrew W. Macpherson

Python packaging unpacked: 2

In this post, I’ll start discussing how to write a build specification in order to achieve a desired end-user experience. (We’ll look at what happens in the backend another day.) The fundamental configuration options for the distribution author fall into four groups: Importable modules. Entry points. Resources. Distribution metadata. These control how users can interact with your project after installation. Authors also have to configure some aspects of how users can obtain their distribution:...

June 17, 2021

Python packaging unpacked

This post is the start of a series on the Python packaging ecosystem. It is targeted at the version of me that existed before I learned all this stuff. It is targeted at anyone who knows Python, but has little or no knowledge of how to get their code into a form that can be installed on someones computer by running pip install {mypackage}. It is targeted at anyone who wants to know what that command actually does, where the package goes, and how Python finds it....

May 28, 2021

Making make make LaTeX

As part of an ongoing investigation into smarter ways to build $\LaTeX$ documents — rather than just running pdflatex and biber repeatedly by hand like a chump — last week I learned how to make (GNU) makefiles work with $\LaTeX$. This task isn’t quite a “standard” makefile problem; its solution involves: making make check file contents instead of only last-modified time; making make run a loop; embedding Python scripts in makefiles (not strictly required, but my solution involved this)....

April 7, 2021
© 2022 a w macpherson · Powered by Hugo · Theme PaperMod