-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference previous specifications & other material #659
base: master
Are you sure you want to change the base?
Reference previous specifications & other material #659
Conversation
This addresses #341.
include links to the Agda module for each section
actionWellFormed _ = ⊤ | ||
actionWellFormed (ChangePParams x) = ppdWellFormed x | ||
actionWellFormed (TreasuryWdrl x) = ∀[ a ∈ dom x ] RwdAddr.net a ≡ NetworkId | ||
× ∃[ v ∈ range x ] ¬ (v ≡ 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is not aimed at making the code look nicer, but the small change here is more readable (and I won't remember to make a separate PR for it later).
@@ -35,7 +38,7 @@ explanations may be missing or wrong. | |||
|
|||
\begin{NoConway} | |||
\begin{center} | |||
Repository: \url{https://github.com/IntersectMBO/formal-ledger-specifications} | |||
Repository: \url{\repourl} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case the repo url changes in future (again)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
6fa0196
to
c93843c
Compare
|
||
module Ledger.Notation where | ||
\end{code} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there's no reason for this to be an Agda module.
src/latex/agda-latex-macros.sty
Outdated
%% then we can just use, e.g., \LedgerURL{Chain} instead of requiring a special \LedgerChain macro. | ||
%% Unfortunatley, I get a strange LaTeX error when I try the above. | ||
%% (Maybe make this an issue later; not urgent enough to do now.) | ||
\newcommand{\LedgerLedger}{\href{https://github.com/IntersectMBO/formal-ledger-specifications/blob/master/src/Ledger/Ledger.lagda}{\AgdaModule{Ledger.Ledger}}\xspace} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making module names links to the module in our repo will make it easier for readers to find the source if they wish.
Besides the changes I comment on above, changes to the references.bib file include pulling in refs from the bib files of previous eras, alphabetizing the file, and changing entry names so they share a common pattern. |
system. Currently, this contains some logic that is handled by | ||
POOLREAP in the Shelley specification, since POOLREAP is not implemented here. | ||
system. Currently, this contains some logic that is handled by | ||
POOLREAP in the Shelley specification~(\cite[Sec.~11.6]{shelley-ledger-spec}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really a comment for this review, more like a rambling.
If we are going to continue using latex, it may make sense to switch to biblatex for citations (together with cleveref) so this would be written as:
POOLREAP in \textcite[\sectionname~11.6]{shelley-ledger-spec} ...
where
\NewDocumentCommand{\sectionname}{}{Section}
\crefname{section}{\sectionname}{\sectionname{}s}
so "Section" is render uniformly across the document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -35,7 +38,7 @@ explanations may be missing or wrong. | |||
|
|||
\begin{NoConway} | |||
\begin{center} | |||
Repository: \url{https://github.com/IntersectMBO/formal-ledger-specifications} | |||
Repository: \url{\repourl} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/Ledger/Introduction.lagda
Outdated
\href{https://github.com/IntersectMBO/formal-ledger-specifications/issues}% | ||
{open an issue} in | ||
\href{https://github.com/IntersectMBO/formal-ledger-specifications}% | ||
{our GitHub repository} with the `notation' label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use \repourl here?
there is no \SecurityGroup, but there is the concept of security-relevant | ||
protocol parameters~\cite{cip1694}. The difference between these notions | ||
is only social, so we implement security-relevant protocol parameters as | ||
a group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is strange to use both \href to refer to a CIP and a citation. We should unify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure a link is necessary when there's a citation right next to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's strange. I think it's nicer to have occurrences of "CIP-1694" link to the CIP, but also include the more conventional reference. Sometimes you want to navigate directly to the CIP from the page you're reading and sometimes you just want to look the bib metadata. These serve two different purposes.
But I do think it's a good idea to have a latex macro named \cip1694
to make it easier to be consistent whenever we refer to \cip1694.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since TeX doesn't allow numbers in macro names, I've used the "leet speak" equivalents, so, for example, \citeIGgA in a tex or agda source file will be typeset as CIP-1694 with a hyperlink to the CIP.
I'm not particularly fond of leet speak, so if you have a better suggestion for naming the macros, please propose it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest in any case to use a command that gets as parameter the CIP not a command per CIP. For example,
\ExplSyntaxOn
\NewDocumentCommand\hrefCIP{m}{%
\clist_if_in:nnTF {0069,1694} {#1}
{%
\href{https://github.com/cardano-foundation/CIPs/tree/master/CIP-#1}{CIP-#1}%
}{%
\PackageError{agda-latex-macros}{CIP-#1~undefined.}{}
}%
}
\ExplSyntaxOff
(It checks whether the arguments is in the list and gives an error otherwise)
It can be used as \hrefCIP{0069}
, for instance.
@@ -160,6 +160,9 @@ the state of the previous era at the transition into the Conway era. | |||
Alternatively, we can effectively treat the old handling of deposits | |||
as an erratum in the Shelley specification, which we fix by implementing | |||
the new deposits logic in older eras and then replaying the chain. | |||
(The handling of deposits in the Shelley era is discussed | |||
in~\cite[Sec.~8]{shelley-ledger-spec} | |||
and~\cite[Sec.~B.2]{shelley-delegation-design}.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another rambling. Using biblatex this would be:
\texcites[Sec.~8]{shelley-ledger-spec}[App.~B.2]{shelley-delegation-design}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good note for the PR that addresses #681.
src/latex/references.bib
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You seem to have forgotten to change some references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe agree on a standard for naming references.
I personally like the one used by dblp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea! I like dblp too. For reference, here's the bib entry for our paper about the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments/typos here and there, but I think I agree with everything @carlostome said
there is no \SecurityGroup, but there is the concept of security-relevant | ||
protocol parameters~\cite{cip1694}. The difference between these notions | ||
is only social, so we implement security-relevant protocol parameters as | ||
a group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure a link is necessary when there's a citation right next to it.
src/Ledger/Utxow.lagda
Outdated
In original spec, however, the right-hand side (\txdatsHashes) could never | ||
contain \nothing, hence the left-hand side (\inputHashes) could never | ||
contain \nothing. | ||
|
||
% TODO: Say what "original spec" refers to? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we can just remove the word 'original'. It's just the Alonzo spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll remove the word "original" in front of "Alonzo." But in the next sentence, the word "original" is ambiguous. It says, "In the original spec, however,..." so presumably that's a reference to Shelley...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 224, 'original spec' also refers to Alonzo. Shelley didn't have this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks. In that case, the "however" connective doesn't make sense. I'll rewrite the sentence.
Co-authored-by: Andre Knispel <[email protected]>
Co-authored-by: Andre Knispel <[email protected]>
Description
This addresses #341.
Checklist
CHANGELOG.md