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

[Mumbai] Michelson opcodes for bytes-nat conversion #2268

Closed
dsawali opened this issue Jan 6, 2023 · 1 comment · Fixed by #2316
Closed

[Mumbai] Michelson opcodes for bytes-nat conversion #2268

dsawali opened this issue Jan 6, 2023 · 1 comment · Fixed by #2316
Assignees
Labels
Michelson 🥸 Related to Michelson language and Taquito's handling of same mumbai
Projects
Milestone

Comments

@dsawali
Copy link
Collaborator

dsawali commented Jan 6, 2023

Context

Conversion between bytes and nat and also bytes and int

Currently in Michelson, there are these minimal specs:

NAT : bytes -> nat  # decode the bytes using the big endian

NAT 0x = 0
NAT 0x00 = 0
NAT 0x123456 = 1193046 (0x123456)
NAT 0x00123456 = 1193046 (0x123456)

BYTES : nat -> bytes    # encode the natural number using the big endian

BYTES 0 = 0x
BYTES 1 = 0x01
BYTES 1193046 = 0x123456

  • Users may want to have an option for the little endian
  • Users may want to have the size of the returned bytes for NAT, left-padded with 0s if necessary.
  • Maybe there are better opcode names.

Assess and adjust the changes in Taquito.

@dsawali dsawali added this to To do in dev via automation Jan 6, 2023
@dsawali dsawali added this to the v16 milestone Jan 6, 2023
@dsawali dsawali added mumbai Michelson 🥸 Related to Michelson language and Taquito's handling of same labels Jan 6, 2023
@dsawali
Copy link
Collaborator Author

dsawali commented Jan 6, 2023

Hey team! Please add your planning poker estimate with Zenhub @hui-an-yang @zainen

zainen pushed a commit that referenced this issue Jan 21, 2023
@zainen zainen self-assigned this Jan 21, 2023
@zainen zainen moved this from To do to In progress in dev Jan 21, 2023
@zainen zainen moved this from In progress to Review in progress in dev Jan 21, 2023
zainen pushed a commit that referenced this issue Jan 23, 2023
zainen pushed a commit that referenced this issue Jan 25, 2023
zainen pushed a commit that referenced this issue Jan 25, 2023
zainen added a commit that referenced this issue Jan 27, 2023
* feat: start support bytes conversion 2268

close #2268

* feat: add suport local-forging BYTES and NAT and tests'

* chore: update test names

---------

Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>
@zainen zainen moved this from Review in progress to Reviewer approved in dev Jan 30, 2023
@Innkst Innkst closed this as completed Feb 1, 2023
dev automation moved this from Reviewer approved to Done Feb 1, 2023
@dsawali dsawali linked a pull request Mar 1, 2023 that will close this issue
9 tasks
dsawali added a commit that referenced this issue Mar 16, 2023
* update Taquito test configs to support Mumbai runs (#2312)

* update Taquito test configs to support Mumbai runs

* updated some integration tests to point to mumbainet

* pdate constant values for mumbainet

* removed accidental change to mondaynet test

* fix: removed consumed_gas from update_consensus_key return result for mumbainet (#2311)

re #2273

* feat(michel-codec): add support for bytes  (#2310)

* feat(michel-codec): add support for bytes for operations and lsl/r x/or not

fix: change test protocol name to mumbai

chore: add integration test. broken currently

Call setup() to request keys

chore(integration tests): add tests for mondaynet new bytes support

chore: change messages and clean

chore: add lima test

* chore: update tests for mumbai

* chore: modify paths for imports

* refactor: pr comments

* monday -> alpha name change for test

* add check to test

Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>

* feat: start support bytes conversion 2268 (#2316)

* feat: start support bytes conversion 2268

close #2268

* feat: add suport local-forging BYTES and NAT and tests'

* chore: update test names

---------

Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>

* 2307 smart rollup types (#2324)

* feat: type support init smart rollup

* chore: fix typo add test with mock data

* feat: may remove new file, continue types

* adjust enums

* feat: add types for smart rollup remaining. remaining work on refute/timeout

* feat: add zk ops and need to check complex types and start testing

* refactor: remove refute / timeout types smart_rollup

* refactor: adjust type

* chore: add test smart rollup add messages and adjust type conflicts

* chore: add test data execute outbox message

* refactor: correct wrong type

* add back no-any eslint ignore

* refactor: correct types update test suite execute outbox

* refactor: remove other smart contract op kinds types and zk types

* remove from opkind

* fix spacing

* refactor: fix up caught errors && clarify types

* adjust type

---------

Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>

* remove kathmandu references (#2323)

* 2318 estimate decimal (#2329)

* update estimate overrides to throw error when decimal values are being passed as well as update tests

* updated description

* Run integration tests against Flextesa Mumbainet (#2343)

* Run integration tests against Flextesa Mumbainet

* Fix typos in integration-tests/config.ts

* 2270 support new rpc endpoint ticket balance and all ticket balance (#2313)

* feat: support new rpc endpoint ticket_balance

re #2270

* feat: support new rpc endpoint all_ticket_balances

re #2270

* fix: changed http method of all_ticket_balances to get

re #2270

* fix: type definition mistake

re #2270

* docs: updated docs for getTicketBalance rpc endpoint

#2270

* fix: remove // in formatCacheKey when passed rpcMethodData and updated doc

re #2270

* test: added rpc endpoint ticketBalance and allTicketBalances unit test

re #2270

* test: added rpc endpoint ticketBalance and allTicketBalances integration test

re #2270

* fix: added mumbai protocol to have empty txRollupAddress in known-contracts file

* fix: correct misused of rpcMethodParams in RpcClientCache

* style: address comment to keep type names uppercase

re #2270

* test: removed not needed contract code and use code_with_ticket.ts instead

re #2270

* test: removed console.log

re #2270

* test: added try catch when originating contract and removed non-null assertion

re #2270

* test: removed all tx_rollup references out of integration-tests

* test: removed more tx rollup references in integration tests and some styles and doc update

re #2270

* style: addressed comments regard style and docs

* style: fixed ci run error

* test: added more assertion to integration test

* test: added array assertion for getAllTicketBalances result

re #2270

* ci: added flextesa mumbaibox to ci run

* fix: fix ci run

* revert: revert ci changes and update integration test to target correct testnet

* Run integration tests pipelines when PR are merged to `mumbai` branch

* feat(local-forger): 2308 support smart rollup originate local forging (#2339)

feat: start implementation with tests smart rollup add messages need refactor

feat: add forging for execute outbox message with mock bytes change bytes name

chore: more expects for execute outbox message test

refactor: change param need add messages

fix: fix missed decoders and remove unneeded

refactor: integration tests  sr originate, add message. fix decoder and needs more testing

fix: properly parse array from add messages message

needs cleanup and refactor

refactor: change name

feat: support forging execute_outbox_message

fix: dont test sr against less than mumbai

fix: fix broken test from proper implementation

fix: bad file structure for tests

refactor: update naming

refactor: add better names and refactor unneeded

format alltest cases

refactor: format and missed name change

refactor: update type doc fix test name

Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>

* 2320 support transfer ticket operation for mumbai (#2341)

* feat: support transfer_ticket operation change for mumbai

re #2320

* feat: eabling transfer ticket between implicit in rpc-batch-provider

re #2320

* test: added integration test for trasfnerTicket operation between implicit and originated account

re #2320

* test: updated comments and adjusted indentation

re #2320

* fix: updated OperationResultTransferTicket property

re #2320

* style: format document

* docs: minor typo

* 2350 tz4 validation (#2362)

* added validation case for tz4 addresses

* adjusted codec test

* add mumbai condition to run test

* Added support for smart_rollup_add_messages op and relevant tests (#2352)

* Added support for smart_rollup_add_messages op and relevant tests

* add mumbai condition on new integration test

* remove debug statement

* addressed PR comments

* added batch tests and fixed typo in estimates

* added mumbai condition

* Addressed PR comments

* added more details in docs

* feat: added type ConstantsResponseProto016 and updated rpc-get-protocol-constnats.spec.ts (#2376)

re #2375

* remove mumbai branch condition from github workflow

* 485 remove babylon kathmandu (#2373)

* perf: update some examples for ghostnet

remove file change that will conflict

* refactor: remove unused variables from integration tests

* refactor: slight improvement, remove tx rollup contracts

* refactor: remove past protocol check

* refactor: remove tx from mondaynet github workflow

---------

Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>

* updated docusaurus to latest version (#2381)

* updated protocol hash in favour of PtMumbai2 (#2387)

* updated protocol hash in favour of PtMumbai2

* updated integration tests and contract references

* updated protocol hash in local forger

* updated configs

* reverted lima contracts

* chore(releng) bump version to 16.0.0-beta-RC.0

---------

Co-authored-by: hui-an-yang <106410553+hui-an-yang@users.noreply.github.com>
Co-authored-by: Zainen <72581075+zainen@users.noreply.github.com>
Co-authored-by: Zainen Suzuki <zainensuzuki@Zainens-MacBook-Pro.local>
Co-authored-by: Daniele Lisi <22307776+danielelisi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Michelson 🥸 Related to Michelson language and Taquito's handling of same mumbai
Projects
dev
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants