-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Checklist
- This is a bug report, not a question. Ask questions on discuss.ipfs.io.
- I have searched on the issue tracker for my bug.
- I am running the latest go-ipfs version or have an issue updating.
Installation method
ipfs-desktop
Version
ipfs version --all
go-ipfs version: 0.12.0-06191dfef
Repo version: 12
System version: amd64/darwin
Golang version: go1.17.6
Config
{
"API": {
"HTTPHeaders": {}
},
"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5001",
"Announce": [],
"AppendAnnounce": [],
"Gateway": "/ip4/127.0.0.1/tcp/8081",
"NoAnnounce": [],
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001",
"/ip4/0.0.0.0/udp/4001/quic",
"/ip6/::/udp/4001/quic"
]
},
"AutoNAT": {},
"Bootstrap": [
"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
],
"DNS": {
"Resolvers": {}
},
"Datastore": {
"BloomFilterSize": 0,
"GCPeriod": "1h",
"HashOnRead": false,
"Spec": {
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": true,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
},
"StorageGCWatermark": 90,
"StorageMax": "10GB"
},
"Discovery": {
"MDNS": {
"Enabled": true,
"Interval": 10
}
},
"Experimental": {
"AcceleratedDHTClient": false,
"FilestoreEnabled": false,
"GraphsyncEnabled": false,
"Libp2pStreamMounting": false,
"P2pHttpProxy": false,
"StrategicProviding": false,
"UrlstoreEnabled": false
},
"Gateway": {
"APICommands": [],
"HTTPHeaders": {
"Access-Control-Allow-Headers": [
"X-Requested-With",
"Range",
"User-Agent"
],
"Access-Control-Allow-Methods": [
"GET"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"NoDNSLink": false,
"NoFetch": false,
"PathPrefixes": [],
"PublicGateways": null,
"RootRedirect": "",
"Writable": false
},
"Identity": {
"PeerID": "12D3KooWL4Kt9dVHftkmjdKet99VUAk5GfS4fxSBd9tUQwyXSXGG"
},
"Internal": {},
"Ipns": {
"RecordLifetime": "",
"RepublishPeriod": "",
"ResolveCacheSize": 128
},
"Migration": {
"DownloadSources": [],
"Keep": ""
},
"Mounts": {
"FuseAllowOther": false,
"IPFS": "/ipfs",
"IPNS": "/ipns"
},
"Peering": {
"Peers": null
},
"Pinning": {
"RemoteServices": {
"alwaysNFT": {
"API": {
"Endpoint": "http://localhost:8088/ipfsapi"
},
"Policies": {
"MFS": {
"Enable": false,
"PinName": "",
"RepinInterval": ""
}
}
},
"pinata": {
"API": {
"Endpoint": "https://api.pinata.cloud/psa"
},
"Policies": {
"MFS": {
"Enable": false,
"PinName": "",
"RepinInterval": ""
}
}
}
}
},
"Plugins": {
"Plugins": null
},
"Provider": {
"Strategy": ""
},
"Pubsub": {
"DisableSigning": false,
"Router": ""
},
"Reprovider": {
"Interval": "12h",
"Strategy": "all"
},
"Routing": {
"Type": "dht"
},
"Swarm": {
"AddrFilters": null,
"ConnMgr": {
"GracePeriod": "300s",
"HighWater": 300,
"LowWater": 50,
"Type": "basic"
},
"DisableBandwidthMetrics": false,
"DisableNatPortMap": false,
"RelayClient": {},
"RelayService": {},
"Transports": {
"Multiplexers": {},
"Network": {},
"Security": {}
}
}
}Description
We are building an implementation of the ipfs remote pinning API and cross-checking against the go-ipfs implementation.
It looks like ipfs pin remote ls skips files when two files have creation dates within a second of each other. These are the pins in our database:
filename | datecreated
----------------+--------------------------------
file2659.dat | 2022-03-04 06:00:25.91637+00
file2658.dat | 2022-03-04 06:00:24.899773+00
file2657.dat | 2022-03-04 06:00:24.03629+00
file2656.dat | 2022-03-04 06:00:22.98233+00
file2655.dat | 2022-03-04 06:00:21.954263+00
file2654.dat | 2022-03-04 06:00:21.079727+00
file26530.dat | 2022-03-04 06:00:20.258195+00
file2653.dat | 2022-03-04 06:00:19.415329+00
file26529.dat | 2022-03-04 06:00:18.625286+00
file26528.dat | 2022-03-04 06:00:17.877294+00
file26527.dat | 2022-03-04 06:00:17.073337+00
file26526.dat | 2022-03-04 06:00:16.298727+00
file26525.dat | 2022-03-04 06:00:15.34932+00
file26524.dat | 2022-03-04 06:00:14.470775+00
file26523.dat | 2022-03-04 06:00:13.695262+00
file26522.dat | 2022-03-04 06:00:12.804065+00
file26521.dat | 2022-03-04 06:00:11.933292+00
file26520.dat | 2022-03-04 06:00:11.049674+00
file2652.dat | 2022-03-04 06:00:10.250677+00
file26519.dat | 2022-03-04 06:00:09.411705+00
file26518.dat | 2022-03-04 06:00:08.597348+00
file26517.dat | 2022-03-04 06:00:07.898356+00
file26516.dat | 2022-03-04 06:00:07.213373+00
file26515.dat | 2022-03-04 06:00:06.358728+00
file26514.dat | 2022-03-04 06:00:05.547268+00
file26513.dat | 2022-03-04 06:00:04.728247+00
file26512.dat | 2022-03-04 06:00:03.76135+00
file26511.dat | 2022-03-04 06:00:02.974295+00
file26510.dat | 2022-03-04 06:00:02.070656+00
file2651.dat | 2022-03-04 06:00:01.352209+00
file2650.dat | 2022-03-04 06:00:00.575174+00
(31 rows)
This is what ipfs pin remote ls returns:
% ipfs pin remote ls --service=alwaysNFT
QmVcWnsfQ9cjZUz8oc2419XtincZ7oX2s4uy1raViDXdBy pinned file2659.dat
QmepaMJpAfYsUAStCcqTcSpSATgK7dqd6hEKcRc5EGD9M2 pinned file2658.dat
QmTPqcFUYKoB43YnJRPzTWtxSYb2NYyznNSAXcHzTkseYc pinned file2657.dat
QmRAkFamSC2SRJdGKRHMZTfzTrxn1ePTQ4oiUnEjpFRayr pinned file2656.dat
QmSLczjF7cNXCdK1zm8TmhbyHYzYV27rHf6Y1PF864wYRb pinned file2655.dat
Qmd77xJzv9apMEjE2MHNKb7Vc6PZo8hKAyxkCT7kmtR1JJ pinned file2654.dat
QmViqpreDaJHs7PxhAVokypJg1MtR5GM1XyWwbLohyztnP pinned file26530.dat
Qma9fVpAxxyAqkZYCnRUXwhRxuYmWLDoNQzSNq7YAhGiTq pinned file2653.dat
QmUYFyz2MSKiksCteGa6Dd1DqZMwDYkbPvrhZiNvd7VjFa pinned file26529.dat
QmTm2vCKU5TwE4EUN8xUdDw2NNWPDenDhxgHxcH9ckt38h pinned file26528.dat
QmVctn2yAxmS5GgY3qAFFxo4v6sYWLFXThjm2mRzuH4RQC pinned file26526.dat
QmazXhqJQjjAsGp1eBb8EzMwvLkBoxRkmePMWwx4D6snja pinned file26525.dat
QmNWLWrh9pEQciaPpsXXwgUQwNmbtK473Pa4B7VEHehcJa pinned file26524.dat
QmXyLTx4F96V9HVfnhR3sGiYd7XQBVd1vPVPe1n7N5hNMo pinned file26523.dat
QmfQN648Wq5yT2rau9RZMKGC5j6M4XkecYPegPjNSku2WL pinned file26522.dat
QmUBfhT6VngPJUkTiWBFqxHKKyCw9v84TywTQL9CVnfjPF pinned file26521.dat
QmTxQhXzpX6CJ39mVx1PvBExDvmd3amSekTKivQFZNz2Qe pinned file26520.dat
QmUP4jEAxR3UuUsE3EJwUW83LzkcUyrMVNfH9tEEExxJAa pinned file2652.dat
QmVGxJKKJU3CCEHjLMhHRp3E7KGhBy9XHpwur9Xkgkga8M pinned file26519.dat
QmbgZnodUXtDx9HN2DU4zFLuSbQj6dzRBwSxvXakizUH6v pinned file26518.dat
QmQypAywRj1ba8p881nCdKXf9uL2FU3ViMRwDvusX2DqV5 pinned file26517.dat
QmZbCfGCiMuYB2BGZit3rmwJVnfutft4WhHDuHtmuAFpBs pinned file26516.dat
QmSVukqZoLD51gzfakUFKACpukS913vPiWn2aHbBr6zTBz pinned file26515.dat
QmPhzfM6Y5Q31C6AoTrJoxAy6t3mBnU2ZH15SE7gdJ8xSk pinned file26514.dat
QmeKqYEriFyCyc253b5n1YcaQDGifZJkU41Mu3UVbKx8jn pinned file26513.dat
QmRMYfCfwyeBGiXEVgLUVmQVaSNAowtxJfduYzuQLwTXHN pinned file26512.dat
QmcvLF5R9ceKZw4GBuCD4EpKtdjDQ16Fe6EewPCoSs2rLR pinned file26511.dat
QmZZ1gGAfL8PhjdNT8xr7QNqEAKtxSuh9MY2eDr8o77bnn pinned file26510.dat
QmdzLWBgfFZCysoDPW5MP221NfCmHcepy8RyWaXoQJ6Juf pinned file2651.dat
QmP7fdDDHaMdvcieJdJZaxaKDgaZTnVpox52ZiM47G7CMK pinned file2650.dat
Note that file file26527.dat is missing from the list. Also note that file26527.dat was created within the same second as the previous file and is the 11th file in the expected output.
Your first call to our service was:
GET /ipfsapi/pins?limit=10&status=pinned
And we returned pins with the creation dates:
{"count":31,"results":[{"requestid":"399c0a15-b677-45f1-959e-3eb75e6fcab3","status":"pinned","created":"2022-03-04T06:00:25.916Z","pin":{"cid":"QmVcWnsfQ9cjZUz8oc2419XtincZ7oX2s4uy1raViDXdBy","origins":[],"name":"file2659.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"048408de-d979-4d92-90b6-7af2ea953245","status":"pinned","created":"2022-03-04T06:00:24.899Z","pin":{"cid":"QmepaMJpAfYsUAStCcqTcSpSATgK7dqd6hEKcRc5EGD9M2","origins":[],"name":"file2658.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"5ab7b350-a136-4ae5-aeaf-61d6eff9f790","status":"pinned","created":"2022-03-04T06:00:24.036Z","pin":{"cid":"QmTPqcFUYKoB43YnJRPzTWtxSYb2NYyznNSAXcHzTkseYc","origins":[],"name":"file2657.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"d9c85a93-8f6f-4386-944b-a24818e425e1","status":"pinned","created":"2022-03-04T06:00:22.982Z","pin":{"cid":"QmRAkFamSC2SRJdGKRHMZTfzTrxn1ePTQ4oiUnEjpFRayr","origins":[],"name":"file2656.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"0fca840e-0fc9-4062-b825-189ce1fd435a","status":"pinned","created":"2022-03-04T06:00:21.954Z","pin":{"cid":"QmSLczjF7cNXCdK1zm8TmhbyHYzYV27rHf6Y1PF864wYRb","origins":[],"name":"file2655.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"6f7b5e93-4a68-4f63-ab11-0f517b9d6738","status":"pinned","created":"2022-03-04T06:00:21.079Z","pin":{"cid":"Qmd77xJzv9apMEjE2MHNKb7Vc6PZo8hKAyxkCT7kmtR1JJ","origins":[],"name":"file2654.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"4138b704-3ca6-4c84-98b5-eac8bae5003f","status":"pinned","created":"2022-03-04T06:00:20.258Z","pin":{"cid":"QmViqpreDaJHs7PxhAVokypJg1MtR5GM1XyWwbLohyztnP","origins":[],"name":"file26530.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"f9bcb08f-b7ce-4f5f-8a1f-66ac9d8ba65d","status":"pinned","created":"2022-03-04T06:00:19.415Z","pin":{"cid":"Qma9fVpAxxyAqkZYCnRUXwhRxuYmWLDoNQzSNq7YAhGiTq","origins":[],"name":"file2653.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"a5b694b7-5d94-407d-be28-877f8f9df70c","status":"pinned","created":"2022-03-04T06:00:18.625Z","pin":{"cid":"QmUYFyz2MSKiksCteGa6Dd1DqZMwDYkbPvrhZiNvd7VjFa","origins":[],"name":"file26529.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}},{"requestid":"097b7f9f-2adf-4190-a202-9dbd1317fffe","status":"pinned","created":"2022-03-04T06:00:17.877Z","pin":{"cid":"QmTm2vCKU5TwE4EUN8xUdDw2NNWPDenDhxgHxcH9ckt38h","origins":[],"name":"file26528.dat","meta":{},"delegates":[],"info":{"projectid":"3b04ec20-8785-46e5-a38b-bc1046446935","pinCount":"1"}}}]}
Note that the final created timestamp returned was "2022-03-04T06:00:17.877Z",
to get the next page of output, go-ipfs sent:
GET /ipfsapi/pins?before=2022-03-04T06%3A00%3A17Z&limit=10&status=pinned
Omitting the millisecond portion of the timestamp. Consequently, file26527.dat which had a creation date between 6:00:17 and 6:00:18 was not included in the output.
This error should be reproduceable with any remote pinning service with high rates of pinning.