Skip to content

Commit

Permalink
act working
Browse files Browse the repository at this point in the history
  • Loading branch information
asabya committed Oct 22, 2024
1 parent d0406e0 commit 7acb8cc
Show file tree
Hide file tree
Showing 12 changed files with 1,784 additions and 32 deletions.
15 changes: 15 additions & 0 deletions cmd/dfs/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,21 @@ func startHttpService(logger logging.Logger) *http.Server {
gitRouter.HandleFunc("/{user}/{repo}.git/git-upload-pack", handler.GitUploadPack).Methods("POST")
gitRouter.HandleFunc("/{user}/{repo}.git/git-receive-pack", handler.GitReceivePack).Methods("POST")

actRouter := baseRouter.PathPrefix("/act/").Subrouter()
actRouter.Use(handler.GitAuthMiddleware)

// list acts
// owner
actRouter.HandleFunc("/grantee/{actName}", handler.CreateGranteeHandler).Methods("POST")
actRouter.HandleFunc("/grantee/{actName}", handler.GrantRevokeHandler).Methods("PATCH")
actRouter.HandleFunc("/grantee/{actName}", handler.ListGranteesHandler).Methods("GET")
actRouter.HandleFunc("/share-pod", handler.ACTPodShareHandler).Methods("PATCH")
actRouter.HandleFunc("/list", handler.ACTListHandler).Methods("GET")
actRouter.HandleFunc("/act-shared-pods", handler.ACTSharedPods).Methods("GET")
// grantee
actRouter.HandleFunc("/save-act-pod", handler.ACTSavePod).Methods("POST")
actRouter.HandleFunc("/open-act-pod", handler.ACTOpenPod).Methods("POST")

var origins []string
for _, c := range corsOrigins {
c = strings.TrimSpace(c)
Expand Down
20 changes: 9 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ module github.com/fairdatasociety/fairOS-dfs
go 1.22.0

require (
github.com/asabya/swarm-blockstore v0.0.0-20241007072942-fef6cc83ff36
github.com/btcsuite/btcd/btcec/v2 v2.3.3
github.com/asabya/swarm-act v0.0.0-20241022090815-9b494c0051de
github.com/asabya/swarm-blockstore v0.0.0-20241022084926-8d6753f32697
github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/c-bata/go-prompt v0.2.6
github.com/dustin/go-humanize v1.0.1
github.com/ethereum/go-ethereum v1.14.7
Expand Down Expand Up @@ -43,7 +44,7 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd v0.22.3 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
Expand All @@ -55,6 +56,7 @@ require (
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect
github.com/ethersphere/go-price-oracle-abi v0.2.0 // indirect
github.com/ethersphere/go-storage-incentives-abi v0.9.1 // indirect
github.com/ethersphere/go-sw3-abi v0.6.5 // indirect
Expand All @@ -75,7 +77,7 @@ require (
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/uint256 v1.3.0 // indirect
github.com/holiman/uint256 v1.3.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down Expand Up @@ -127,7 +129,7 @@ require (
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/supranational/blst v0.3.13 // indirect
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand All @@ -137,7 +139,7 @@ require (
github.com/vmihailenco/msgpack/v5 v5.3.4 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wealdtech/go-multicodec v1.4.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
Expand All @@ -147,7 +149,7 @@ require (
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
Expand All @@ -157,8 +159,4 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethersphere/bee/v2 => ../../ethersphere/bee

replace github.com/asabya/swarm-blockstore => ../../asabya/swarm-blockstore

replace github.com/codahale/hdrhistogram => github.com/HdrHistogram/hdrhistogram-go v0.0.0-20200919145931-8dac23c8dac1
34 changes: 20 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkT
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/asabya/swarm-act v0.0.0-20241022090815-9b494c0051de h1:d5PDY+pU7QCIu3VNSftUq6rc4hNC6GfxH8vI1JItWNU=
github.com/asabya/swarm-act v0.0.0-20241022090815-9b494c0051de/go.mod h1:JKFHSirdVKLWOdJpk7cl8732JiI+a9G64dzB58CEO8w=
github.com/asabya/swarm-blockstore v0.0.0-20241022084926-8d6753f32697 h1:MhH/TMo8jvCafB/WcI8MKajuWuodymKHiLZLGAQ35nE=
github.com/asabya/swarm-blockstore v0.0.0-20241022084926-8d6753f32697/go.mod h1:Tc8wjIjbbV0Ofrr3JPmxDcbmg571M6yFEdKOqWelWgo=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88=
github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE=
github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
github.com/btcsuite/btcd v0.22.3 h1:kYNaWFvOw6xvqP0vR20RP1Zq1DVMBxEO8QN5d1/EfNg=
github.com/btcsuite/btcd v0.22.3/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y=
github.com/btcsuite/btcd/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ensb7o3sC0=
github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U=
github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
Expand Down Expand Up @@ -77,8 +81,10 @@ github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHE
github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.14.7 h1:EHpv3dE8evQmpVEQ/Ne2ahB06n2mQptdwqaMNhAT29g=
github.com/ethereum/go-ethereum v1.14.7/go.mod h1:Mq0biU2jbdmKSZoqOj29017ygFrMnB5/Rifwp980W4o=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w=
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A=
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
github.com/ethersphere/bee/v2 v2.2.0 h1:UOrnGuacIlRD9RHSux9W13eI0ppsJvz6Xa0MTn6UuJ4=
github.com/ethersphere/bee/v2 v2.2.0/go.mod h1:9mrRirUnAJwSmnB9kJBx6Bo94LCgFrj2jYDJA20SIe0=
github.com/ethersphere/bmt v0.1.4 h1:+rkWYNtMgDx6bkNqGdWu+U9DgGI1rRZplpSW3YhBr1Q=
github.com/ethersphere/bmt v0.1.4/go.mod h1:Yd8ft1U69WDuHevZc/rwPxUv1rzPSMpMnS6xbU53aY8=
github.com/ethersphere/go-price-oracle-abi v0.2.0 h1:wtIcYLgNZHY4BjYwJCnu93SvJdVAZVvBaKinspyyHvQ=
Expand Down Expand Up @@ -179,8 +185,8 @@ github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6w
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc=
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=
github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4=
github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E=
github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs=
github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
Expand Down Expand Up @@ -377,8 +383,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk=
github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a h1:kAe4YSu0O0UFn1DowNo2MY5p6xzqtJ/wQ7LZynSvGaY=
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
github.com/swaggo/http-swagger v1.3.4 h1:q7t/XLx0n15H1Q9/tk3Y9L4n210XzJF5WtnDX64a5ww=
Expand Down Expand Up @@ -415,8 +421,8 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
gitlab.com/nolash/go-mockbytes v0.0.7 h1:9XVFpEfY67kGBVJve3uV19kzqORdlo7V+q09OE6Yo54=
gitlab.com/nolash/go-mockbytes v0.0.7/go.mod h1:KKOpNTT39j2Eo+P6uUTOncntfeKY6AFh/2CxuD5MpgE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
Expand Down Expand Up @@ -522,8 +528,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
1 change: 0 additions & 1 deletion pkg/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func (a *Account) CreateUserAccount(mnemonic string) (string, []byte, error) {
if err != nil {
return "", nil, err
}

hdw, err := hdwallet.NewFromMnemonic(mnemonic)
if err != nil { // skipcq: TCV-001
return "", nil, err
Expand Down
95 changes: 95 additions & 0 deletions pkg/act/act.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
package act

import (
"bytes"
"encoding/hex"
"encoding/json"
"errors"
"io"
"sync"

"github.com/btcsuite/btcd/btcec/v2"

swarm_act "github.com/asabya/swarm-act"

"github.com/fairdatasociety/fairOS-dfs/pkg/utils"

blockstore "github.com/asabya/swarm-blockstore"
"github.com/ethereum/go-ethereum/crypto"
"github.com/fairdatasociety/fairOS-dfs/pkg/account"
"github.com/fairdatasociety/fairOS-dfs/pkg/feed"
f "github.com/fairdatasociety/fairOS-dfs/pkg/file"
"github.com/fairdatasociety/fairOS-dfs/pkg/logging"
"github.com/fairdatasociety/fairOS-dfs/pkg/taskmanager"
)

var (
ErrACTAlreadyExists = errors.New("ACT already exists")
ErrACTDoesNowExist = errors.New("ACT does not exist")
)

type ACT struct {
fd *feed.API
acc *account.Account
client blockstore.Client
logger logging.Logger
tm taskmanager.TaskManagerGO
act *swarm_act.ACT
mu *sync.RWMutex
}

func NewACT(client blockstore.Client, feed *feed.API, account *account.Account, m taskmanager.TaskManagerGO, logger logging.Logger) *ACT {
accountInfo := account.GetUserAccountInfo()
accPrivKey, _ := btcec.PrivKeyFromBytes(accountInfo.GetPrivateKey().D.Bytes())
act := swarm_act.New(client, accPrivKey.ToECDSA(), "")
return &ACT{
fd: feed,
acc: account,
client: client,
logger: logger,
tm: m,
act: act,
mu: &sync.RWMutex{},
}
}

func (t *ACT) storeUserACTs(actList List) error {
data, err := json.Marshal(actList)
if err != nil {
return err
}

// store data as file and get metadata
// This is a very hacky way to store pod data, but it works for now
// We create a new file object with the user account address and upload the data
// We use the user private key to encrypt data.
f2 := f.NewFile("", t.client, t.fd, t.acc.GetAddress(account.UserAccountIndex), t.tm, t.logger)
privKeyBytes := crypto.FromECDSA(t.acc.GetUserAccountInfo().GetPrivateKey())
return f2.Upload(bytes.NewReader(data), actFile, int64(len(data)), f.MinBlockSize, 0, "/", "gzip", hex.EncodeToString(privKeyBytes))
}

func (t *ACT) loadUserACTs() (List, error) {
actList := List{}
f2 := f.NewFile("", t.client, t.fd, t.acc.GetAddress(account.UserAccountIndex), t.tm, t.logger)
topicString := utils.CombinePathAndFile("", actFile)
privKeyBytes := crypto.FromECDSA(t.acc.GetUserAccountInfo().GetPrivateKey())
r, _, err := f2.Download(topicString, hex.EncodeToString(privKeyBytes))
if err != nil { // skipcq: TCV-001
return actList, nil
}
data, err := io.ReadAll(r)
if err != nil { // skipcq: TCV-001
return nil, err
}

if len(data) == 0 {
return actList, nil
}

err = json.Unmarshal(data, &actList)
if err != nil { // skipcq: TCV-001
return nil, err
}

return actList, nil
}
Loading

0 comments on commit 7acb8cc

Please sign in to comment.