Skip to content
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

[chain] fix result size #889

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

wlawt
Copy link
Contributor

@wlawt wlawt commented May 6, 2024

Fixes the following:

  • Packs the number of Actions in result.Outputs
  • Packs the number of Outputs in each Action. This fixes the problem when unmarshaling we know where the outputs should be nested

@wlawt wlawt changed the base branch from main to multi-action-support May 6, 2024 19:53
@wlawt wlawt marked this pull request as ready for review May 7, 2024 17:43
@wlawt wlawt requested a review from patrick-ogrady as a code owner May 7, 2024 17:43
@wlawt wlawt force-pushed the multi-action-support branch from 9d61e43 to 22d0862 Compare May 7, 2024 17:49
@wlawt wlawt force-pushed the fix-result-size branch from b501d94 to d5ce5f5 Compare May 7, 2024 18:22
@wlawt wlawt force-pushed the multi-action-support branch from 395c79c to 43d77e2 Compare May 9, 2024 14:53
@wlawt wlawt force-pushed the fix-result-size branch from d5ce5f5 to a98efe1 Compare May 9, 2024 14:56
@wlawt wlawt self-assigned this May 9, 2024
@patrick-ogrady
Copy link
Contributor

Going to consolidate into a single branch to make reviews easier.

@patrick-ogrady patrick-ogrady merged commit 4d7e3dc into multi-action-support May 20, 2024
21 of 24 checks passed
@patrick-ogrady patrick-ogrady deleted the fix-result-size branch May 20, 2024 19:47
patrick-ogrady added a commit that referenced this pull request May 22, 2024
* add generic

* emap passes

* eheap passes

* fix tokenvm orderbook

* intro ActionID

* intro max actions

* enforce max actions + loop thru statekeys

* fix some tx errors

* fix builder errors

* fix processor errors

* fix more tx errors

* fix client rpc error

* fix morpheus transfer action

* fix more morpheus

* morpheusVM compiles

* fix mock gen

* fix morpheus static lint

* fix lint and function signatures

* fix rpc GenerateTx

* import chain into morpheus actions

* more lints

* marhsal unmarshal Actions

* totalUnits fees.Add

* fix invalid signature

* fix some tx fees and packing bytes

* check maxActions earlier

* morpheus integration passes

* make action.Execute use actionID

* intro codec.ActionID

* fix tokenvm

* tokevnm integration errors

* fix tokenvm integration error

* tokenvm integration passes

* create long ID

* fix token-cli lint

* fix token fauct and feed lint

* introduce multiple result.Outputs and morpheus integration passes

* tokenvm integration passes using multiple result.Outputs

* increase maxActions for tokenvm to 2

* add multiple transfers in 1 tx

* add create and mint multiple assets

* add multiple trades

* add failed fill order

* address lints

* add hrp param to LIDFromString

* fix x/programs lint

* getmaxactionspertx should be uint8

* update readme

* self review

* fix rust ci

* make get action id a helper

* move GetMaxActionsPerTx

* add MaxOutputsPerAction

* actions instead of action

* do sponsorkeys after action iteration

* add action idx and type to ErrActionNotActivated

* dont override prev outputs in handleRevert

* skip all if one action is failed, do fee comp at the end, refund once

* introduce LIDLen

* fix type alias

* use PackLID

* use codec.LIDLen

* EstimateMaxUnits over all actions

* revert is populated in last output of last action

* fix action Size

* fix LID to and from String

* make EmptyAddress const more generic

* if not successful error is last output in last action

* add comments in transaction

* fix mock gen

* fix rust ci

* [chain] fix result size (#889)

* include r.Outputs size in calculation above

* fix packing of Outputs for each Action

* [chain] Remove execute success (#894)

* remove err from Action

* mock gen

* add more TODOs

* add context on why revert is better

* add back error

* cleanup interface

* cleanup tx loop

* update error marshaling

* update transfer op

* cleaning up access

* finish tokenvm

* update mocks

* fix programs

* update create order

* cleanup cmd program

* backend.go compiles

* more cleanup

* morpheusvm integration passing

* fix tokenvm integration

* add nolint

* require lint

---------

Co-authored-by: Patrick O'Grady <prohb125@gmail.com>

* remove trailing enter

* revert `codec.LID` (#920)

* remove LID definition

* remove optional packer

* update cli

* update heap

* eheap + emap

* making progress on morpheusvm

* cleanup load test error

* tokenvm actions

* update token-cli

* update token-feed + token-faucet

* update token-wallet

* more progress in tokenvm

* update token storage

* use id const

* update programs

* unit tests passing

* remove consts form simulator

* fix lint

* pass integration tests

* integration test passing

* reduce size of digest

* fix load test

* e2e lint

* reuse nodes

* reuse nodes

* fix lint

* run gci

* multi-action nits (#922)

* add key validity check to Keys set

* cleanup state key validity checking

* reviewed chain/transaction

* cli changes

* add multi-send example to morpheus

* cleanup tokenvm

* remove heap casting

* fix program execute

* fix return

* cleanup var names

* unify error

* update fetcher tests

* remove unnecessary conversion

* update programs code

* update action batches section

---------

Co-authored-by: Patrick O'Grady <prohb125@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants