ton-blockchain / ton

Main TON monorepo
Other
2.95k stars 891 forks source link

Bug: byte string does not fit into cell #212

Closed Tynik closed 4 years ago

Tynik commented 4 years ago

Hi! I ran to an issue when I tried to create the Builder with 2 bytes sequence and more as for example sign_bin B and encrypted_password B.

Then the next error occured: B,: byte string does not fit into cell [ 1][t 0][1576008527.729760170][fift-main.cpp:196] Error interpreting file ./test.fif: error interpreting included file tests.fif : test.fif:50: B,: byte string does not fit into cell

How it can be solved or it's not an issue at all?

file-password file>B =: encrypted_password
<b
  0 32 u,
  encryptedPassword B,
b> constant sign-msg
sign-msg hashu wallet_pk ed25519_sign_uint constant sign_bin
<b sign_bin B, 0 32 u, encrypted_password B, b>
dkaraush commented 4 years ago

Cell — A TVM cell, consisting of up to 1023 data bits and up to 4 references to other cells (cf. [4]).

https://test.ton.org/fiftbase.pdf (7th page)

ton-blockchain commented 4 years ago

This does not seem a bug. Clearly, you are trying to store more than 1023 bits into a Builder. This is impossible.