Skip to content

Commit bd91810

Browse files
cmd: fix some typos in readmes (#29405)
* Update README.md updated for readability * Update rules.md Updated for readability and typos
1 parent b9010f3 commit bd91810

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

cmd/clef/rules.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ It enables usecases like the following:
99

1010
The two main features that are required for this to work well are;
1111

12-
1. Rule Implementation: how to create, manage and interpret rules in a flexible but secure manner
13-
2. Credential managements and credentials; how to provide auto-unlock without exposing keys unnecessarily.
12+
1. Rule Implementation: how to create, manage, and interpret rules in a flexible but secure manner
13+
2. Credential management and credentials; how to provide auto-unlock without exposing keys unnecessarily.
1414

1515
The section below deals with both of them
1616

1717
## Rule Implementation
1818

19-
A ruleset file is implemented as a `js` file. Under the hood, the ruleset-engine is a `SignerUI`, implementing the same methods as the `json-rpc` methods
19+
A ruleset file is implemented as a `js` file. Under the hood, the ruleset engine is a `SignerUI`, implementing the same methods as the `json-rpc` methods
2020
defined in the UI protocol. Example:
2121

2222
```js
@@ -27,7 +27,7 @@ function asBig(str) {
2727
return new BigNumber(str)
2828
}
2929

30-
// Approve transactions to a certain contract if value is below a certain limit
30+
// Approve transactions to a certain contract if the value is below a certain limit
3131
function ApproveTx(req) {
3232
var limit = big.Newint("0xb1a2bc2ec50000")
3333
var value = asBig(req.transaction.value);
@@ -70,7 +70,7 @@ The Otto vm has a few [caveats](https://github.com/robertkrimen/otto):
7070
Additionally, a few more have been added
7171

7272
* The rule execution cannot load external javascript files.
73-
* The only preloaded library is [`bignumber.js`](https://github.com/MikeMcl/bignumber.js) version `2.0.3`. This one is fairly old, and is not aligned with the documentation at the github repository.
73+
* The only preloaded library is [`bignumber.js`](https://github.com/MikeMcl/bignumber.js) version `2.0.3`. This one is fairly old, and is not aligned with the documentation at the GitHub repository.
7474
* Each invocation is made in a fresh virtual machine. This means that you cannot store data in global variables between invocations. This is a deliberate choice -- if you want to store data, use the disk-backed `storage`, since rules should not rely on ephemeral data.
7575
* Javascript API parameters are _always_ an object. This is also a design choice, to ensure that parameters are accessed by _key_ and not by order. This is to prevent mistakes due to missing parameters or parameter changes.
7676
* The JS engine has access to `storage` and `console`.
@@ -88,8 +88,8 @@ Some security precautions can be made, such as:
8888

8989
##### Security of implementation
9090

91-
The drawbacks of this very flexible solution is that the `signer` needs to contain a javascript engine. This is pretty simple to implement, since it's already
92-
implemented for `geth`. There are no known security vulnerabilities in, nor have we had any security-problems with it so far.
91+
The drawback of this very flexible solution is that the `signer` needs to contain a javascript engine. This is pretty simple to implement since it's already
92+
implemented for `geth`. There are no known security vulnerabilities in it, nor have we had any security problems with it so far.
9393

9494
The javascript engine would be an added attack surface; but if the validation of `rulesets` is made good (with hash-based attestation), the actual javascript cannot be considered
9595
an attack surface -- if an attacker can control the ruleset, a much simpler attack would be to implement an "always-approve" rule instead of exploiting the js vm. The only benefit
@@ -105,7 +105,7 @@ It's unclear whether any other DSL could be more secure; since there's always th
105105

106106
## Credential management
107107

108-
The ability to auto-approve transaction means that the signer needs to have necessary credentials to decrypt keyfiles. These passwords are hereafter called `ksp` (keystore pass).
108+
The ability to auto-approve transactions means that the signer needs to have the necessary credentials to decrypt keyfiles. These passwords are hereafter called `ksp` (keystore pass).
109109

110110
### Example implementation
111111

@@ -127,8 +127,8 @@ The `vault.dat` would be an encrypted container storing the following informatio
127127

128128
### Security considerations
129129

130-
This would leave it up to the user to ensure that the `path/to/masterseed` is handled in a secure way. It's difficult to get around this, although one could
131-
imagine leveraging OS-level keychains where supported. The setup is however in general similar to how ssh-keys are stored in `.ssh/`.
130+
This would leave it up to the user to ensure that the `path/to/masterseed` is handled securely. It's difficult to get around this, although one could
131+
imagine leveraging OS-level keychains where supported. The setup is however, in general, similar to how ssh-keys are stored in `.ssh/`.
132132

133133

134134
# Implementation status
@@ -149,7 +149,7 @@ function big(str) {
149149
// Time window: 1 week
150150
var window = 1000* 3600*24*7;
151151

152-
// Limit : 1 ether
152+
// Limit: 1 ether
153153
var limit = new BigNumber("1e18");
154154

155155
function isLimitOk(transaction) {
@@ -163,7 +163,7 @@ function isLimitOk(transaction) {
163163
if (stored != "") {
164164
txs = JSON.parse(stored)
165165
}
166-
// First, remove all that have passed out of the time-window
166+
// First, remove all that has passed out of the time window
167167
var newtxs = txs.filter(function(tx){return tx.tstamp > windowstart});
168168
console.log(txs, newtxs.length);
169169

@@ -174,7 +174,7 @@ function isLimitOk(transaction) {
174174
console.log("ApproveTx > Sum so far", sum);
175175
console.log("ApproveTx > Requested", value.toNumber());
176176

177-
// Would we exceed weekly limit ?
177+
// Would we exceed the weekly limit ?
178178
return sum.plus(value).lt(limit)
179179

180180
}

cmd/ethkey/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ contains the password.
5050

5151
## JSON
5252

53-
In case you need to output the result in a JSON format, you shall by using the `--json` flag.
53+
In case you need to output the result in a JSON format, you shall use the `--json` flag.

0 commit comments

Comments
 (0)