Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit fee360f
Author: Tsachi Herman <[email protected]>
Date:   Fri Oct 4 11:23:58 2024 -0400

    refactor marshalActions implementation (#1631)

commit 2cb5530
Author: aaronbuchwald <[email protected]>
Date:   Thu Oct 3 18:49:12 2024 -0400

    Add block indexing to Indexer API (#1606)

commit f1bcc59
Author: aaronbuchwald <[email protected]>
Date:   Thu Oct 3 18:31:39 2024 -0400

    Add JSON marshalling to Result (#1627)

commit 2ea784a
Author: Richard Pringle <[email protected]>
Date:   Thu Oct 3 12:54:10 2024 -0400

    Implement multisig example (#1581)

commit 6bbf236
Author: Richard Pringle <[email protected]>
Date:   Thu Oct 3 12:43:41 2024 -0400

    Update codeowners (#1629)

commit 47849d8
Author: aaronbuchwald <[email protected]>
Date:   Thu Oct 3 08:34:51 2024 -0400

    Re-mark pubsub tests as flaky (#1625)

commit d847132
Author: aaronbuchwald <[email protected]>
Date:   Wed Oct 2 14:23:24 2024 -0400

    Reduce tests.unit.sh timeout value less than CI job (#1623)

commit 404e74f
Author: aaronbuchwald <[email protected]>
Date:   Wed Oct 2 14:07:04 2024 -0400

    Add JSON marshalling for fee dimensions (#1622)

commit 7e53003
Author: Joshua Kim <[email protected]>
Date:   Wed Oct 2 12:38:34 2024 -0400

    Replace usage of `internal/network` with `p2p` (#1613)

    Signed-off-by: Joshua Kim <[email protected]>

commit 79f363e
Author: containerman17 <[email protected]>
Date:   Wed Oct 2 11:53:59 2024 +0900

    Standardize decimals (#1620)

commit e191c88
Author: Joshua Kim <[email protected]>
Date:   Tue Oct 1 20:02:30 2024 -0400

    Update to [email protected] (#1614)

    Signed-off-by: Joshua Kim <[email protected]>

commit 59c84d7
Author: aaronbuchwald <[email protected]>
Date:   Tue Oct 1 17:19:17 2024 -0400

    Add ExecutedBlock type (#1601)

commit 165a455
Author: Tsachi Herman <[email protected]>
Date:   Tue Oct 1 09:26:32 2024 -0400

    validate buffer length prior to calling Uint64 (#1588)

commit c24f0d8
Author: rodrigo <[email protected]>
Date:   Tue Oct 1 09:25:18 2024 -0400

    Fix VM-With-Contracts Unit Tests (#1602)

commit 8ab9d83
Author: aaronbuchwald <[email protected]>
Date:   Mon Sep 30 16:57:29 2024 -0400

    Minor nits on pubsub implementation (#1593)

commit 592cd7a
Author: rodrigo <[email protected]>
Date:   Mon Sep 30 12:46:35 2024 -0400

    Remove `StateKeysMaxChunks()` (#1607)

commit 3e358c1
Author: aaronbuchwald <[email protected]>
Date:   Mon Sep 30 12:46:20 2024 -0400

    Update ActionBenchmark to use single ExpectedOutput (#1608)

commit e78841e
Author: Franfran <[email protected]>
Date:   Mon Sep 30 16:42:00 2024 +0200

    Write FIFO cache unit tests (#1201)

    * write FIFO cache unit tests

    * invert expected / actual

    * add limit parameter and cache fail on 0 size

    * simplify test table and create new test for empty cache

    * simpler tests by having a limit of 2

    * fix test cases

    * typos

    * backout uselesss change

    * add a "not an LRU" test case

    * use switch in fifo unit tests

commit f1150a1
Author: aaronbuchwald <[email protected]>
Date:   Fri Sep 27 17:46:28 2024 -0400

    Update tx indexer to include tx action outputs (#1597)

commit 6a3fd63
Author: Joshua Kim <[email protected]>
Date:   Thu Sep 26 15:44:56 2024 -0400

    Remove usage of mockgen (#1591)

    Signed-off-by: Joshua Kim <[email protected]>

commit 49376bd
Author: rodrigo <[email protected]>
Date:   Thu Sep 26 14:39:59 2024 -0400

    Fix benchmarks (#1590)

commit 77a73ba
Author: Richard Pringle <[email protected]>
Date:   Tue Sep 24 12:38:27 2024 -0400

    Ignore gas on mock-function-call (#1585)

commit 1bbab7b
Author: containerman17 <[email protected]>
Date:   Tue Sep 24 23:19:18 2024 +0900

    Remove special cases for Bytes, add arrays support (#1587)

commit 3410599
Author: aaronbuchwald <[email protected]>
Date:   Mon Sep 23 12:34:55 2024 -0400

    Add spam cmd to morpheus readme (#1577)

commit dfefd27
Author: aaronbuchwald <[email protected]>
Date:   Mon Sep 23 12:34:32 2024 -0400

    Improve chain comments (#1579)

commit 6c15244
Author: Richard Pringle <[email protected]>
Date:   Fri Sep 20 16:10:21 2024 -0400

    Series of changes that improve development (#1583)

commit e0a3324
Author: Richard Pringle <[email protected]>
Date:   Fri Sep 20 13:12:58 2024 -0400

    Use repr(packed) with state-keys (#1580)

commit 75c6cfd
Author: aaronbuchwald <[email protected]>
Date:   Thu Sep 19 07:58:39 2024 -0400

    Separate proposer monitor from vm into internal package (#1574)

Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim committed Nov 4, 2024
1 parent a28960b commit 864f03d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
33 changes: 33 additions & 0 deletions examples/morpheusvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,36 @@ height:635 txs:10 root:2W6eEZQYqD9xCsZoDPjASqtZx25fyUUobpesuKJJAxnFMU4RJi size:2
✅ 2WXLjEXf25WeinidC9qmghZWbCeDa26F8pwwkFb53MSsEQm1NL actor: 0090dc1ecabfc7680d68bc226158095861544b9309b251eed2f3d2425bc991285f summary (*actions.Transfer): [0.000000001 RED -> 0090dc1ecabfc7680d68bc226158095861544b9309b251eed2f3d2425bc991285f
] fee (max 86.84%): 0.000029700 RED consumed: [bandwidth=200 compute=7 storage(read)=14 storage(allocate)=50 storage(write)=26]
```

If you are running this on a local network, you may see that all blocks are empty.
To view the same results with non-empty transactions, you can run the spam command from another window:
```bash
./build/morpheus-cli spam run ed25519
```

After inputting the parameters, you'll see output from the spam command showing inflight transactions:

```
minimum txs to issue per second: 10
txs to increase per second: 10
number of clients per node: 10
unique participants expected every 60s: 10
distributing funds to each account: 999.978355900 RED
distributed funds to 10 accounts
initial target tps: 10
txs seen: 10 success rate: 100.00% inflight: 10 issued/s: 21 unit prices: [bandwidth=100 compute=100 storage(read)=100 storage(allocate)=100 storage(write)=100]
```

The transactions will start to show up in the CLI explorer tool as well:

```
watching for new blocks on bsED31vJbynkhzKrjtNFtUXcg6Y78MjQLg1KBgesMw1xom8F9 👀
height:634 txs:0 root:B6upYeCegoR5bvfUGLo9GqbymyBCgXNobpTk53HBFNBZGG4aM size:0.08KB units consumed: [bandwidth=0 compute=0 storage(read)=0 storage(allocate)=0 storage(write)=0] unit prices: [bandwidth=100 compute=100 storage(read)=100 storage(allocate)=100 storage(write)=100]
height:635 txs:10 root:2W6eEZQYqD9xCsZoDPjASqtZx25fyUUobpesuKJJAxnFMU4RJi size:2.04KB units consumed: [bandwidth=2000 compute=70 storage(read)=140 storage(allocate)=500 storage(write)=260] unit prices: [bandwidth=100 compute=100 storage(read)=100 storage(allocate)=100 storage(write)=100] [TPS:85.69 latency:81ms gap:116ms]
✅ 2QEttqwxZyMF8Lzyj44wpsEhpbVyASq8c7Z4ogh3DDrWDKgKyh actor: 0090dc1ecabfc7680d68bc226158095861544b9309b251eed2f3d2425bc991285f summary (*actions.Transfer): [0.000000001 RED -> 0090dc1ecabfc7680d68bc226158095861544b9309b251eed2f3d2425bc991285f
] fee (max 86.84%): 0.000029700 RED consumed: [bandwidth=200 compute=7 storage(read)=14 storage(allocate)=50 storage(write)=26]
✅ 2HVNY8gbeBCrNiekTReGpKZ9hqkZea8Wf4VGjbdroorwEY7s7u actor: 00bd82f4be137f29222695f693e72a9e85e83510e575a3e485eb306a8ad5999010 summary (*actions.Transfer): [0.000000001 RED -> 00bd82f4be137f29222695f693e72a9e85e83510e575a3e485eb306a8ad5999010
] fee (max 86.84%): 0.000029700 RED consumed: [bandwidth=200 compute=7 storage(read)=14 storage(allocate)=50 storage(write)=26]
✅ 2WXLjEXf25WeinidC9qmghZWbCeDa26F8pwwkFb53MSsEQm1NL actor: 0090dc1ecabfc7680d68bc226158095861544b9309b251eed2f3d2425bc991285f summary (*actions.Transfer): [0.000000001 RED -> 0090dc1ecabfc7680d68bc226158095861544b9309b251eed2f3d2425bc991285f
] fee (max 86.84%): 0.000029700 RED consumed: [bandwidth=200 compute=7 storage(read)=14 storage(allocate)=50 storage(write)=26]
```
2 changes: 1 addition & 1 deletion x/contracts/vm/actions/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (*Call) GetTypeID() uint8 {
return mconsts.CallContractID
}

func (t *Call) StateKeys(_ codec.Address, _ ids.ID) state.Keys {
func (t *Call) StateKeys(_ codec.Address) state.Keys {
result := state.Keys{}
for _, stateKeyPermission := range t.SpecifiedStateKeys {
result.Add(stateKeyPermission.Key, stateKeyPermission.Permission)
Expand Down
2 changes: 1 addition & 1 deletion x/contracts/vm/actions/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (*Deploy) GetTypeID() uint8 {
return mconsts.DeployID
}

func (d *Deploy) StateKeys(_ codec.Address, _ ids.ID) state.Keys {
func (d *Deploy) StateKeys(_ codec.Address) state.Keys {
if d.address == codec.EmptyAddress {
d.address = storage.GetAddressForDeploy(0, d.CreationInfo)
}
Expand Down
2 changes: 1 addition & 1 deletion x/contracts/vm/actions/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (*Transfer) GetTypeID() uint8 {
return mconsts.TransferID
}

func (t *Transfer) StateKeys(actor codec.Address, _ ids.ID) state.Keys {
func (t *Transfer) StateKeys(actor codec.Address) state.Keys {
return state.Keys{
string(storage.BalanceKey(actor)): state.Read | state.Write,
string(storage.BalanceKey(t.To)): state.All,
Expand Down

0 comments on commit 864f03d

Please sign in to comment.