tech-greedy / singularity

New node software for large-scale clients with PB-scale data onboarding to Filecoin network
Other
38 stars 18 forks source link

Replication for offline non-verified/regular deals needs --manual-stateless-deal flag #177

Closed frank-ang closed 1 year ago

frank-ang commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Regular non-verified offline deal proposal error: failed to start deal: failed to get blockstore for imported root

Version singularity -V

2.1.1

To Reproduce Steps to reproduce the behavior:

# prep
singularity prep ...

# Do not import CAR into lotus
# lotus client import --car /tmp/car/9335b323/baga6ea4seaqai35b7r2i2zahnbzi2hui7e5ctuvtvabupj7bomzqcbn4x3e34bq.car

# Send a regular, non-verified deal.
singularity repl start --max-deals 2 --cron-schedule '*/2 * * * *' --cron-max-deals 200 --cron-max-pending-deals 2 \ 
--start-delay 1 --duration 180 --verified false --price 2 --output-csv /tmp/singularity-csv/9335b323 \
9335b323 t01000 t1djcw6gt533u2bdzckvtcui6hmmuzpu3mykxkunq

observe error in singularity.log

2023-01-25T05:04:00.562Z [deal_replication_worker] error: Deal making failed Command failed: lotus client deal --manual-piece-cid=baga6e
a4seaqai35b7r2i2zahnbzi2hui7e5ctuvtvabupj7bomzqcbn4x3e34bq --manual-piece-size=2032  --from=t1djcw6gt533u2bdzckvtcui6hmmuzpu3mykxkunq --
verified-deal=false --start-epoch=2979 bafybeiadgdwycelcyd2rjv3w6n3rtdojbaprfcvrpcghrv6krib66lof74 t01000 0.000003814697265625 518400
ERROR: failed to start deal: failed to get blockstore for imported root bafybeiadgdwycelcyd2rjv3w6n3rtdojbaprfcvrpcghrv6krib66lof74: no 
client blockstore for root bafybeiadgdwycelcyd2rjv3w6n3rtdojbaprfcvrpcghrv6krib66lof74

Expected behavior A clear and concise description of what you expected to happen.

Regular non-verified offline deal proposal should succeed

Suggested root cause

Missing --manual-stateless-deal flag in lotus client deal command. https://github.com/tech-greedy/singularity/blob/e1bcd9925415b30d498e7207e3c3f060ef9c4d87/src/replication/DealReplicationWorker.ts#L195

xinaxu commented 1 year ago

Legacy deal has now reached end of life. Clients and SPs should switch to using boost now.

kernelogic commented 1 year ago

@frank-ang this tag is enabled for all zero priced offline deals regardless whether it's verified or unverified. When ribasushi made this tag available, it only supports zero price deal.